зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1478203 [wpt PR 12174] - Fix resources/test and prevent infra changes from breaking the suite again, a=testonly
Automatic update from web-platform-testsFix resources/test suite The suite was broken by PR #11976 where the config class was changed. The suite uses a hack to get the default config of wptserve. This commit fixes the hack, but unfortunately does not find a less hacky way to get the default config. -- Run resources_unittest on CI if tools are changed To prevent changes in tools (especially `wpt serve` and its dependencies) from breaking the resources/test suite again, this commit adds "tools/" to the watchlist of the suite. -- wpt-commits: 2877f572684541d6cd2f301d72f4114dd35ce885, d03becfbbe9df94fb06c2a00ff9ad549634f3660 wpt-pr: 12174
This commit is contained in:
Родитель
faee564332
Коммит
ce622732ff
|
@ -9,12 +9,15 @@ import urllib2
|
|||
class WPTServer(object):
|
||||
def __init__(self, wpt_root):
|
||||
self.wpt_root = wpt_root
|
||||
|
||||
# This is a terrible hack to get the default config of wptserve.
|
||||
sys.path.insert(0, os.path.join(wpt_root, "tools"))
|
||||
from serve.serve import Config
|
||||
config = Config()
|
||||
self.host = config["browser_host"]
|
||||
self.http_port = config["ports"]["http"][0]
|
||||
self.https_port = config["ports"]["https"][0]
|
||||
from serve.serve import build_config
|
||||
with build_config() as config:
|
||||
self.host = config["browser_host"]
|
||||
self.http_port = config["ports"]["http"][0]
|
||||
self.https_port = config["ports"]["https"][0]
|
||||
|
||||
self.base_url = 'http://%s:%s' % (self.host, self.http_port)
|
||||
self.https_base_url = 'https://%s:%s' % (self.host, self.https_port)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ job_path_map = {
|
|||
"!css/[^/]*$"],
|
||||
"lint": [".*"],
|
||||
"manifest_upload": [".*"],
|
||||
"resources_unittest": ["resources/"],
|
||||
"resources_unittest": ["resources/", "tools/"],
|
||||
"tools_unittest": ["tools/"],
|
||||
"wptrunner_unittest": ["tools/wptrunner/*"],
|
||||
"build_css": ["css/"],
|
||||
|
|
|
@ -7,6 +7,8 @@ def test_testharness():
|
|||
assert jobs.get_jobs(["resources/testharness.js"]) == default_jobs | set(["resources_unittest"])
|
||||
assert jobs.get_jobs(["resources/testharness.js"],
|
||||
includes=["resources_unittest"]) == set(["resources_unittest"])
|
||||
assert jobs.get_jobs(["tools/wptserve/wptserve/config.py"],
|
||||
includes=["resources_unittest"]) == set(["resources_unittest"])
|
||||
assert jobs.get_jobs(["foo/resources/testharness.js"],
|
||||
includes=["resources_unittest"]) == set()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче