зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1272255 - Force MOZ_DISABLE_NONLOCAL_CONNECTIONS in Marionette-based tests r=webdriver-reviewers,whimboo,chutten
Differential Revision: https://phabricator.services.mozilla.com/D137691
This commit is contained in:
Родитель
570e636697
Коммит
343524674b
|
@ -64,6 +64,11 @@ def run_firefox_ui_test(testtype=None, topsrcdir=None, **kwargs):
|
|||
for test in test_types[testtype]["default_tests"]
|
||||
]
|
||||
|
||||
# Disable non-local connections except for remote tests.
|
||||
if "test_tags" in kwargs and "remote" not in kwargs.get("test_tags"):
|
||||
# Causes Firefox to crash when using non-local connections.
|
||||
os.environ["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
|
||||
|
||||
kwargs["logger"] = kwargs.pop("log", None)
|
||||
if not kwargs["logger"]:
|
||||
kwargs["logger"] = commandline.setup_logging(
|
||||
|
|
|
@ -50,6 +50,9 @@ def run_marionette(tests, binary=None, topsrcdir=None, **kwargs):
|
|||
|
||||
parser.verify_usage(args)
|
||||
|
||||
# Causes Firefox to crash when using non-local connections.
|
||||
os.environ["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
|
||||
|
||||
if not args.logger:
|
||||
args.logger = commandline.setup_logging(
|
||||
"Marionette Unit Tests", args, {"mach": sys.stdout}
|
||||
|
|
|
@ -328,6 +328,11 @@ class FirefoxUITests(TestingMixin, VCSToolsScript, CodeCoverageMixin):
|
|||
if self.config["allow_software_gl_layers"]:
|
||||
env["MOZ_LAYERS_ALLOW_SOFTWARE_GL"] = "1"
|
||||
|
||||
# Disable non-local connections except for remote tests.
|
||||
if self.config.get("tag") and self.config["tag"] != "remote":
|
||||
# Causes Firefox to crash when using non-local connections.
|
||||
env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
|
||||
|
||||
return_code = self.run_command(
|
||||
cmd,
|
||||
cwd=dirs["abs_fxui_dir"],
|
||||
|
|
|
@ -375,6 +375,10 @@ class MarionetteTest(TestingMixin, MercurialScript, TransferMixin, CodeCoverageM
|
|||
|
||||
if not os.path.isdir(env["MOZ_UPLOAD_DIR"]):
|
||||
self.mkdir_p(env["MOZ_UPLOAD_DIR"])
|
||||
|
||||
# Causes Firefox to crash when using non-local connections.
|
||||
env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
|
||||
|
||||
env = self.query_env(partial_env=env)
|
||||
|
||||
try:
|
||||
|
|
|
@ -220,6 +220,9 @@ class TelemetryTests(TestingMixin, VCSToolsScript, CodeCoverageMixin):
|
|||
env["RUST_BACKTRACE"] = "1"
|
||||
env["MOZ_IGNORE_NSS_SHUTDOWN_LEAKS"] = "1"
|
||||
|
||||
# Causes Firefox to crash when using non-local connections.
|
||||
env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
|
||||
|
||||
# If code coverage is enabled, set GCOV_PREFIX env variable
|
||||
if self.config.get("code_coverage"):
|
||||
env["GCOV_PREFIX"] = self.gcov_dir
|
||||
|
|
|
@ -54,6 +54,9 @@ def run_telemetry(tests, binary=None, topsrcdir=None, **kwargs):
|
|||
|
||||
os.environ["MOZ_IGNORE_NSS_SHUTDOWN_LEAKS"] = "1"
|
||||
|
||||
# Causes Firefox to crash when using non-local connections.
|
||||
os.environ["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
|
||||
|
||||
if not args.logger:
|
||||
args.logger = commandline.setup_logging(
|
||||
"Telemetry Client Tests", args, {"mach": sys.stdout}
|
||||
|
|
Загрузка…
Ссылка в новой задаче