Mobile/Fennec Xpcshell: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 70: Line 70:




Of the 39 failures found, we have these issues:
Of the 26 failures found, we have these issues:




16 - test_places/autocomplete has various errors. It appears to be related to Components.utils.import("resource://gre/modules/XPCOMUtils.jsm") or something that is not allowing Ci, gPages, and prefs to be defined.
* 3 - test_places/autocomplete/
 
** test_download_embed_bookmarks.js
4 - gPrefs depends on test_extensionmanager/Unit/head_extensionmanager.js#266 to have the path _tests/xpcshell-simple/test_extensionmanager
** test_special_search.js
 
** test_empty_search.js
4 - test_update/*
* 3 - test_places/unit/
 
** test_000_frecency.js
5 - test_satchel/*  
** test_adaptive.js
 
** test_frecency.js
10 other failures to look into
* 1 - test_places/sync/test_database_sync_embed_visits.js
* 1 - test_libjar/unit/test_bug278262.js
* 5 - test_satchel/unit/
** test_db_corrupt.js
** test_db_update_v999a.js
** test_history_api.js
** test_db_update_v1.js
** test_db_update_v999b.js
* 4 test_extensionsmanager/unit/ - possibly path _tests/xpcshell-simple/test_extensionmanager requirement?
** test_bug428341.js
** test_bug299716.js
** test_bug396129.js
** test_bug463819.js
* 1 test_update/unit/test_0040_general.js
* 2 test_necko/test/
** test_request_line_split_in_two_packets.js
** test_sjs_throwing_exceptions.js
* 1 test_places/queries/test_querySerialization.js
* 1 test_intl_locale/unit/test_pluralForm.js

Revision as of 21:39, 3 February 2009

Getting the Tests

Edit your mozconfig to contain the following lines:

ac_add_options --enable-tests

Get the source and build according to instructions.

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

Porting tests to N800

If following 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:

cp $(topsrcdir)/testing/xpcshell/* $(xul_objdir)/_tests/
cd $(xul_objdir)/_tests
tar -chf xpcshell.tar xpcshell/ xpcshell-simple/

Transfer tar file to device via scp and untar it.

NOTE: it would be nice if the build script (make) would copy the test harness from the source tree to the xulrunner directory.

Getting the Tests

Edit your mozconfig to contain the following lines:

ac_add_options --enable-tests

Get the source and build according to instructions.

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

Porting tests to N800

If following 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:

cp $(topsrcdir)/testing/xpcshell/* $(xul_objdir)/_tests/
cd $(xul_objdir)/_tests
tar -chf xpcshell.tar xpcshell/ xpcshell-simple/

Transfer tar file to device via scp and untar it.

NOTE: it would be nice if the build script (make) would copy the test harness from the source tree to the xulrunner directory.

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.

Inspecting the test_all.sh script in harness/xpcshell, you can run the test from the command line by doing this:

Run the tests from the directory where you unzipped them like so:

./run-mozilla.sh xpcshell  -f /media/mmc1/unittests/xpcshell/xpcshell/head.js  -f /media/mmc1/unittests/xpcshell/xpcshell-simple/test_update/unit/test_0051_general.js  -f /media/mmc1/unittests/xpcshell/xpcshell/tail.js  -f /media/mmc1/unittests/xpcshell/xpcshell/execute_test.js

This is a cumbersome process, and to make this reasonable, we have created [xpctest.py] to run the tests. This script needs to be edited to point to the xpcshell executable as well as the root of the test harness and test directories. It will iterate the tests and build up a list of test_ files to run tests against, then run the above command for you.

TODO's

NOTE: this runs 525 tests where there are 548 tests which run on Firefox (in release only, debug core dumps on assertions at test 223). It appears we are not running on Fennec: test_privatebrowsing/unit/* (6 tests) test_browser_places/unit/* (6 tests) test_browser_feeds/unit/* (1 test)

  • need to find the other 10 missing tests still


Of the 26 failures found, we have these issues:


  • 3 - test_places/autocomplete/
    • test_download_embed_bookmarks.js
    • test_special_search.js
    • test_empty_search.js
  • 3 - test_places/unit/
    • test_000_frecency.js
    • test_adaptive.js
    • test_frecency.js
  • 1 - test_places/sync/test_database_sync_embed_visits.js
  • 1 - test_libjar/unit/test_bug278262.js
  • 5 - test_satchel/unit/
    • test_db_corrupt.js
    • test_db_update_v999a.js
    • test_history_api.js
    • test_db_update_v1.js
    • test_db_update_v999b.js
  • 4 test_extensionsmanager/unit/ - possibly path _tests/xpcshell-simple/test_extensionmanager requirement?
    • test_bug428341.js
    • test_bug299716.js
    • test_bug396129.js
    • test_bug463819.js
  • 1 test_update/unit/test_0040_general.js
  • 2 test_necko/test/
    • test_request_line_split_in_two_packets.js
    • test_sjs_throwing_exceptions.js
  • 1 test_places/queries/test_querySerialization.js
  • 1 test_intl_locale/unit/test_pluralForm.js