Skip to content

Commit

Permalink
Revert "Allow prefs to be overridden from a file and set WPT-specific…
Browse files Browse the repository at this point in the history
… prefs from file (#33163)"

This reverts commit e85491b5fc0ccbedfa312b82edf37d8e1cecc780.
  • Loading branch information
mrobinson authored and servo-wpt-sync committed Aug 30, 2024
1 parent 428f891 commit 623fa62
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions tools/wptrunner/wptrunner/executors/executorservo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def __init__(self, logger, browser, server_config, timeout_multiplier, debug_inf
self.environment = {}
self.protocol = ConnectionlessProtocol(self, browser)

self.wpt_prefs_path = self.find_wpt_prefs()

hosts_fd, self.hosts_path = tempfile.mkstemp()
with os.fdopen(hosts_fd, "w") as f:
f.write(make_hosts_file(server_config, "127.0.0.1"))
Expand All @@ -66,20 +64,6 @@ def on_output(self, line):
else:
self.logger.process_output(self.proc.pid, line, " ".join(self.command), self.test.url)

def find_wpt_prefs(self):
default_path = os.path.join("resources", "wpt-prefs.json")
# The cwd is the servo repo for `./mach test-wpt`, but on WPT runners
# it is the WPT repo. The nightly tar is extracted inside the python
# virtual environment within the repo. This means that on WPT runners,
# the cwd has the `_venv3/servo` directory inside which we find the
# binary and the 'resources' directory.
for dir in [".", "./_venv3/servo"]:
candidate = os.path.abspath(os.path.join(dir, default_path))
if os.path.isfile(candidate):
return candidate
self.logger.error("Unable to find wpt-prefs.json")
return default_path

def build_servo_command(self, test, extra_args=None, debug_opts="replace-surrogates"):
args = [
"--hard-fail", "-u", "Servo/wptrunner",
Expand All @@ -94,7 +78,6 @@ def build_servo_command(self, test, extra_args=None, debug_opts="replace-surroga
args += ["--user-stylesheet", stylesheet]
for pref, value in self.environment.get('prefs', {}).items():
args += ["--pref", f"{pref}={value}"]
args += ["--prefs-file", self.wpt_prefs_path]
if self.browser.ca_certificate_path:
args += ["--certificate-path", self.browser.ca_certificate_path]
if extra_args:
Expand Down

0 comments on commit 623fa62

Please sign in to comment.