Jetpack/Testing: Difference between revisions

Update about test manifests
No edit summary
(Update about test manifests)
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
From the source directory or object directory run:
From the source directory or object directory run:


   mach jetpack-test
   mach mochitest addon-sdk/source


=== Running with make ===
You can also run specific tests like so:


From the object directory run:
  mach mochitest addon-sdk/source/test/test-sandbox.js


  make jetpack-tests
or possibly even:


== Disabling tests ==
  mach mochitest test-sandbox.js


If tests need to be disabled then you can do so by adding the following to the '''end''' of the test file:
if the name doesn't collide with any other tests.


  // Test disabled because of bug XXXXXX
=== Running with make ===
  module.exports = {};


If you need to disable for a particular platform:
Don't.


  // Test disabled on Windows because of bug XXXXXX
== Disabling tests ==
  if (require("sdk/system/runtime").OS == "WINNT")
    module.exports = {};


The OS values are the normal [https://developer.mozilla.org/en-US/docs/OS_TARGET OS_TARGET] values.
Tests can be disabled using the regular mochitest ini manifest. See [https://dxr.mozilla.org/mozilla-central/source/addon-sdk/source/test/jetpack-package.ini jetpack-package.ini] and [https://dxr.mozilla.org/mozilla-central/source/addon-sdk/source/test/addons/jetpack-addon.ini jetpack-addon.ini].


== Running tests from the SDK repository ==
== Running tests from the SDK repository ==
Line 84: Line 81:
  /me/me2B1lFDE0WZCgd33s2OTE+++TU/-Tmp-/tmp72nW_f.mozrunner -foreground -no-remote
  /me/me2B1lFDE0WZCgd33s2OTE+++TU/-Tmp-/tmp72nW_f.mozrunner -foreground -no-remote


You can then run the debugger using that command.
You can then run the debugger using that command:
 
gdb --args /Applications/Firefox.app/Contents/MacOS/firefox-bin -profile /var/folder
/me/me2B1lFDE0WZCgd33s2OTE+++TU/-Tmp-/tmp72nW_f.mozrunner -foreground -no-remote


== Gory Details of Testing With cfx ==
== Gory Details of Testing With cfx ==
canmove, Confirmed users
1,570

edits