Mobile/Fennec Xpcshell: Difference between revisions

Line 12: Line 12:


==Porting tests to N800==
==Porting tests to N800==
With changes from {{bug421611}} we have made this process much simpler. 
If following [[Mobile/Build/Fennec#Running Fennec on Maemo|directions]] for running fennec on N800/N810 devices, you will need to package up the tests from the xulrunner directory and the test harness from the source tree:
If following [[Mobile/Build/Fennec#Running Fennec on Maemo|directions]] for running fennec on N800/N810 devices, you will need to package up the tests from the xulrunner directory and the test harness from the source tree:


<pre>
<pre>
cp $(topsrcdir)/testing/xpcshell/* $(xul_objdir)/_tests/
cd $(xul_objdir)
cd $(xul_objdir)/_tests
make package-tests
tar -chf xpcshell.tar xpcshell/ xpcshell-simple/
cd dist
bunzip2 xulrunner-*tests.tar.bz2
scp xulrunner-*tests.tar root@<deviceip>:/media/mmc1
</pre>
</pre>
In addition, we need to copy all the unit/ directories which contain data files, include files and other support scripts.  We have developed a script [[http://people.mozilla.org/~jmaher/fennec/xpctest-extract.py xpctest-extract.py]] which will create a xpcfiles.tar for you to copy and untar in the root of your xpcshell test directory
Transfer tar files to device via scp and untar it in a _tests/ directory.
NOTE: the _tests directory needs to be ../../ from the xulrunner directory.  So if you have a fennec/xulrunner/ directory which contains the xulrunner application, you would need to put the _tests/ folder adjacent to the fennec folder.  This is because some tests like test_extensionmanager reference files in ../../_tests/test_extensionmanager/unit from the appdir.
NOTE: it would be nice if the build script (make) would copy the test harness and support files from the source tree to the xulrunner directory.


==Running the tests==
==Running the tests==
Confirmed users
3,376

edits