On the next merge to mozilla-central, the `mach test --headless` command
will no longer give an error on directories containing xpcshell tests
<https://bugzilla.mozilla.org/show_bug.cgi?id=1550518> (along with other
suites already supporting --headless). Prior to this enhancement the
command would fail as soon as an xpcshell test was encountered since that
harness didn't support the argument. This required running mach multiple
times in order to execute all tests for a component. Now you no longer have
to worry about whether the tests you execute have a mix of xpcshell and
mochitest flavors when deciding whether to use --headless.

This also means that `mach xpcshell-test --headless` doesn't error, but
that's probably not too interesting for most developers on its own as the
xpcshell test harness already supported running specific tests in headless
mode with the `headless = true` xpcshell.ini annotation
<https://searchfox.org/mozilla-central/search?q=headless+%3D&case=false&regexp=false&path=xpcshell.ini>.
The --headless command line argument has the same behavior as that
annotation
<https://searchfox.org/mozilla-central/rev/4e228dc5f594340d35da7453829ad9f3c3cb8b58/testing/xpcshell/runxpcshelltests.py#686-687>,
it's not a no-op, so it may change some behaviour in tests involving
rendering though those are likely very rare in this suite. Also note that
this configuration isn't run in automation so it's possible some tests will
fail under it but don't without --headless so you may want to run a test
without the argument if you're seeing an unusual failure that doesn't
appear in automation. In that case you could opt the test out of headless
mode with `headless = false` in the manifest.

Thanks to Geoff Brown for the quick review.

Matthew N. (:MattN)
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to