Bug 1603016 - Add a --headless option for mach reftest. r=dbaron

Differential Revision: https://phabricator.services.mozilla.com/D56663

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Cameron McCormack 2019-12-13 00:01:06 +00:00
parent 83bc8c1039
commit 23dcc18ebf
2 changed files with 10 additions and 0 deletions

View File

@ -260,6 +260,12 @@ class ReftestArgumentsParser(argparse.ArgumentParser):
default=False,
help="Enable the WebRender compositor in Gecko.")
self.add_argument("--headless",
action="store_true",
dest="headless",
default=False,
help="Run tests in headless mode.")
mozlog.commandline.add_logging_group(self)
def get_ip(self):

View File

@ -468,6 +468,10 @@ class RefTest(object):
browserEnv["MOZ_ACCELERATED"] = "1"
else:
browserEnv["MOZ_WEBRENDER"] = "0"
if options.headless:
browserEnv["MOZ_HEADLESS"] = "1"
return browserEnv
def cleanup(self, profileDir):