Bug 1712907 - Only try to edit the environment when it's defined, r=whimboo

Differential Revision: https://phabricator.services.mozilla.com/D116013
This commit is contained in:
James Graham 2021-05-26 19:30:55 +00:00
parent b3fbbb15d3
commit 2a9ca0fe16

View File

@ -180,23 +180,22 @@ def executor_kwargs(logger, test_type, test_environment, run_info_data,
kwargs["enable_webrender"],
kwargs["chaos_mode_flags"])
leak_report_file = setup_leak_report(kwargs["leak_check"], profile, environ)
else:
if kwargs["headless"] and "--headless" not in options["args"]:
options["args"].append("--headless")
leak_report_file = None
# This doesn't work with wdspec tests
# In particular tests can create a session without passing in the capabilites
# and in those cases we get the default geckodriver profile which doesn't
# guarantee zero network access
del environ["MOZ_DISABLE_NONLOCAL_CONNECTIONS"]
executor_kwargs["environ"] = environ
else:
if kwargs["headless"] and "--headless" not in options["args"]:
options["args"].append("--headless")
leak_report_file = None
executor_kwargs["stackfix_dir"] = kwargs["stackfix_dir"],
executor_kwargs["leak_report_file"] = leak_report_file
executor_kwargs["asan"] = run_info_data.get("asan")
executor_kwargs["environ"] = environ
if kwargs["certutil_binary"] is None:
capabilities["acceptInsecureCerts"] = True
if capabilities: