diff --git a/testing/mochitest/mochitest_options.py b/testing/mochitest/mochitest_options.py index ef21924761fb..40fcd2da6f92 100644 --- a/testing/mochitest/mochitest_options.py +++ b/testing/mochitest/mochitest_options.py @@ -406,6 +406,11 @@ class MochitestArguments(ArgumentContainer): "dest": "e10s", "help": "Run tests with electrolysis preferences and test filtering disabled.", }], + [["--enable-fission"], + {"action": "store_true", + "default": False, + "help": "Run tests with fission (site isolation) enabled.", + }], [["--store-chrome-manifest"], {"action": "store", "help": "Destination path to write a copy of any chrome manifest " @@ -824,6 +829,9 @@ class MochitestArguments(ArgumentContainer): parser.error("mochitest-{} does not support e10s, try again with " "--disable-e10s.".format(options.flavor)) + if options.enable_fission: + options.extraPrefs.append("fission.autostart=1") + options.leakThresholds = { "default": options.defaultLeakThreshold, "tab": options.defaultLeakThreshold, diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 00f86ffee79f..67c54c076f7a 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -2614,6 +2614,13 @@ toolbar#nav-bar { tests = self.getActiveTests(options) self.logPreamble(tests) + + if mozinfo.info['fission'] and not mozinfo.info['e10s']: + # Make sure this is logged *after* suite_start so it gets associated with the + # current suite in the summary formatters. + self.log.error("Fission is not supported without e10s.") + return 1 + tests = [t for t in tests if 'disabled' not in t] # Until we have all green, this does not run on a11y (for perf reasons)