Mobile/WinMo Xpcshell: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 1: Line 1:
==Installing the device agent==
Download [[http://people.mozilla.org/~blassey/test-agent/test-agent.exe test-agent.exe]] to your phone.
I recommend putting it in the / directory and [[https://wiki.mozilla.org/ReferencePlatforms/Test/WindowsMobile creating a shortcut]] in /windows/startup.
Now you have a way to telnet to the device:
<pre>
telnet <ip> 27020
</pre>
==Getting the Tests (local build)==
==Getting the Tests (local build)==
Edit your mozconfig to contain the following lines:
Edit your mozconfig to contain the following lines:
Line 18: Line 28:


to learn more about the tests, visit the [[https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests MDC Guide]]
to learn more about the tests, visit the [[https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests MDC Guide]]


==Getting the Tests (ftp)==
==Getting the Tests (ftp)==

Revision as of 14:28, 12 February 2010

Installing the device agent

Download [test-agent.exe] to your phone.

I recommend putting it in the / directory and [creating a shortcut] in /windows/startup.

Now you have a way to telnet to the device:

telnet <ip> 27020

Getting the Tests (local build)

Edit your mozconfig to contain the following lines:

ac_add_options --enable-tests

Get the source and build according to instructions.

After the build is done:

cd $(xul_objdir)/dist/test-package-stage
cp -R xpcshell/* <device>/tests/xpcshell/
cp -R bin/* <device>/tests/bin/

In order to copy, you can either do it via devicemanager, or activesync. Our scripts assume a /tests/xpcshell folder on the device.

to learn more about the tests, visit the [MDC Guide]

Getting the Tests (ftp)

In order to do this, you need to download 1 file from [ftp]:

These links might change as the versions change, but find the wince-arm.tests.tar.bz2 file and you will be good to go.

Download the file and unpack it on your local system in a clean directory.

mkdir /wincetests1
cp ~/*wince-arm.tests.tar.bz2 /wincetests1
cd /wincetests1
bunzip2 *
tar -xvf *wince-arm.tests.tar
cp -R xpcshell/* <device>/tests/xpcshell
cp -R bin/* <device>/tests/bin

Running the tests

The tests are normally ran via "make check" from the root of the objdir. In this case, we are running the tests on the device and there is no source tree.

Make check runs [runxpcshelltests.py]. I am going to refer to $(testroot) which if you are in a local build, it is $(xul_objdir)/dist/test-package-stage, if you used ftp from the server, it is the directory where you unpacked the package and tests files.

cd $(testroot)
python -u xpcshell/runxpcshelltests.py --xre-path=/tests/bin --manifest=xpcshell/tests/all-test-dirs.list /tests/bin/xpcshell