To run xpcshell tests on windows mobile you need to:
- install a device agent on your phone
- get the test files on the phone (either by local build or ftp)
- get the scripts on your desktop (as patches or a .tar file)
- from your desktop run scripts to execute the tests
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:
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
Getting the scripts
There are two method for getting the python scripts to run these tests:
- build with these 3 patches
- download [scripts] to your $(testroot)
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 --device 192.168.1.103 /tests/bin/xpcshell.exe --manifest=/tests/xpcshell/tests/all-test-dirs.list