Bug 1386581 - Imply --headless when MOZ_HEADLESS is set. r=automatedtester
When the MOZ_HEADLESS output variable is set in the environment,
--headless will be implied when using the Marionette harness. This will
cause test rules and ignores to be picked up with MOZ_HEADLESS as they
are with --headless.
MozReview-Commit-ID: 8L7J4asQXyF
--- a/testing/marionette/harness/marionette_harness/runner/base.py
+++ b/testing/marionette/harness/marionette_harness/runner/base.py
@@ -356,21 +356,21 @@ class BaseMarionetteArguments(ArgumentPa
default=self.socket_timeout_default,
help='Set the global timeout for marionette socket operations.'
' Default: %(default)ss.')
self.add_argument('--disable-e10s',
action='store_false',
dest='e10s',
default=True,
help='Disable e10s when running marionette tests.')
- self.add_argument('--headless',
- action='store_true',
- dest='headless',
- default=False,
- help='Enable headless mode when running marionette tests.')
+ self.add_argument("--headless",
+ action="store_true",
+ dest="headless",
+ default=os.environ.get("MOZ_HEADLESS", False),
+ help="Run tests in headless mode.")
self.add_argument('--tag',
action='append', dest='test_tags',
default=None,
help="Filter out tests that don't have the given tag. Can be "
"used multiple times in which case the test must contain "
"at least one of the given tags.")
self.add_argument('--workspace',
action='store',