Building Firefox/SURF: Difference between revisions

Jump to navigation Jump to search
Line 17: Line 17:
<tt>./mach test path/to/test</tt> will run most types of tests; for example <tt>./mach test [https://searchfox.org/mozilla-central/source/dom/security/test/csp/test_upgrade_insecure.html dom/security/test/csp/test_upgrade_insecure.html]</tt>   
<tt>./mach test path/to/test</tt> will run most types of tests; for example <tt>./mach test [https://searchfox.org/mozilla-central/source/dom/security/test/csp/test_upgrade_insecure.html dom/security/test/csp/test_upgrade_insecure.html]</tt>   


You can add --headless (after 'test') to run them without launching the browser window. This is useful when working on a remote server. Note however that while --headless works most of the time, if a test fails to run, it is worth re-running it without -headless in a GUI environment.
You can add --headless (after 'test') to run them without launching the browser window. This is useful when working on a remote server. Note however that while --headless works most of the time, if a test fails to run, it is worth re-running it without --headless in a GUI environment.


gtests are run differently, for example <tt>./mach gtest "*ReducePrecision_*"</tt> to run tests with 'ReducePrecision_' in their name (which would be [https://searchfox.org/mozilla-central/rev/05a22d864814cb1e4352faa4004e1f975c7d2eb9/toolkit/components/resistfingerprinting/tests/test_reduceprecision.cpp#82 tests like these].
gtests are run differently, for example <tt>./mach gtest "*ReducePrecision_*"</tt> to run tests with 'ReducePrecision_' in their name (which would be [https://searchfox.org/mozilla-central/rev/05a22d864814cb1e4352faa4004e1f975c7d2eb9/toolkit/components/resistfingerprinting/tests/test_reduceprecision.cpp#82 tests like these].
131

edits

Navigation menu