Bug 1408977 - Allow running wpt test with chos mode using --chaos[=flag], r=gbrown

MozReview-Commit-ID: E1jrL9EMt5Y

--HG--
extra : rebase_source : a440b055625513c9404957cef35c74184586db1e
This commit is contained in:
James Graham 2017-10-16 12:01:24 +01:00
Родитель 96a521052e
Коммит 1174074efa
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -78,7 +78,8 @@ def browser_kwargs(test_type, run_info_data, **kwargs):
run_info_data,
**kwargs),
"leak_check": kwargs["leak_check"],
"stylo_threads": kwargs["stylo_threads"]}
"stylo_threads": kwargs["stylo_threads"],
"chaos_mode_flags": kwargs["chaos_mode_flags"]}
def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
@ -136,7 +137,8 @@ class FirefoxBrowser(Browser):
def __init__(self, logger, binary, prefs_root, test_type, extra_prefs=None, debug_info=None,
symbols_path=None, stackwalk_binary=None, certutil_binary=None,
ca_certificate_path=None, e10s=False, stackfix_dir=None,
binary_args=None, timeout_multiplier=None, leak_check=False, stylo_threads=1):
binary_args=None, timeout_multiplier=None, leak_check=False, stylo_threads=1,
chaos_mode_flags=None):
Browser.__init__(self, logger)
self.binary = binary
self.prefs_root = prefs_root
@ -164,6 +166,7 @@ class FirefoxBrowser(Browser):
self.leak_report_file = None
self.leak_check = leak_check
self.stylo_threads = stylo_threads
self.chaos_mode_flags = chaos_mode_flags
def settings(self, test):
return {"check_leaks": self.leak_check and not test.leaks}
@ -178,6 +181,8 @@ class FirefoxBrowser(Browser):
env["MOZ_CRASHREPORTER_SHUTDOWN"] = "1"
env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
env["STYLO_THREADS"] = str(self.stylo_threads)
if self.chaos_mode_flags is not None:
env["MOZ_CHAOSMODE"] = str(self.chaos_mode_flags)
locations = ServerLocations(filename=os.path.join(here, "server-locations.txt"))

Просмотреть файл

@ -199,6 +199,11 @@ scheme host and port.""")
gecko_group.add_argument("--reftest-screenshot", dest="reftest_screenshot", action="store",
choices=["always", "fail", "unexpected"], default="unexpected",
help="With --reftest-internal, when to take a screenshot")
gecko_group.add_argument("--chaos", dest="chaos_mode_flags", action="store",
nargs="?", const=0xFFFFFFFF, type=int,
help="Enable chaos mode with the specified feature flag "
"(see http://searchfox.org/mozilla-central/source/mfbt/ChaosMode.h for "
"details). If no value is supplied, all features are activated")
servo_group = parser.add_argument_group("Servo-specific")
servo_group.add_argument("--user-stylesheet",