Skip to content

Commit

Permalink
Pass server config via a file.
Browse files Browse the repository at this point in the history
This change unblocks importer, where webdriver tests are failing due to changes in web-platform-tests/wpt#28834

Change-Id: Ia07ed877aa808da41a49260900a390c87e9c5521
No-Export: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2890259
Reviewed-by: Jason Chase <[email protected]>
Reviewed-by: John Chen <[email protected]>
Commit-Queue: Kyle Ju <[email protected]>
Cr-Commit-Position: refs/heads/master@{#882198}
  • Loading branch information
kyle Ju authored and Chromium LUCI CQ committed May 12, 2021
1 parent e802ff8 commit cceae6e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/run_webdriver_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,24 @@ def set_up_config(path_finder, chromedriver_server):
}
})

config_path = os.path.join(tempfile.mkdtemp(), "wd_server_config.json")
os.environ["WD_SERVER_CONFIG_FILE"] = config_path
# Port numbers are defined at
# https://cs.chromium.org/chromium/src/third_party/blink/tools
# /blinkpy/web_tests/servers/wptserve.py?l=23&rcl=375b34c6ba64
# 5d00c1413e4c6106c7bb74581c85
os.environ["WD_SERVER_CONFIG"] = json.dumps({
config_dict = {
"doc_root": path_finder.path_from_chromium_base(CHROMIUM_WPT_DIR),
"browser_host": "web-platform.test",
"domains": {"": {"": "web-platform.test",
"www": "www.web-platform.test",
"www.www": "www.www.web-platform.test",
"www1": "www1.web-platform.test",
"www2": "www2.web-platform.test"}},
"ports": {"ws": [9001], "wss": [9444], "http": [8001], "https": [8444]}})
"ports": {"ws": [9001], "wss": [9444], "http": [8001], "https": [8444]}}
with open(config_path, "w") as f:
json.dump(config_dict, f)


def run_test(path, path_finder, port, skipped_tests=[]):
abs_path = os.path.abspath(path)
Expand Down

0 comments on commit cceae6e

Please sign in to comment.