Skip to content

Commit

Permalink
Bug 1547568 [wpt PR 16537] - Use a path segment trie for the manifest…
Browse files Browse the repository at this point in the history
…, a=testonly

Automatic update from web-platform-tests
Major new manifest version (v8): path trie edition

This essentially implements web-platform-tests/rfcs#40.
--

wpt-commits: 31c0f5efba38b7d1d7f45ac449bcbc892e8771ce
wpt-pr: 16537

UltraBlame original commit: a35a8d5c00bdfb36d38d996eae17921ad8495154
  • Loading branch information
marco-c committed Feb 12, 2020
1 parent eff4eb7 commit 7407d2f
Show file tree
Hide file tree
Showing 12 changed files with 611 additions and 356 deletions.
14 changes: 14 additions & 0 deletions testing/web-platform/tests/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'macOS-10.14'
variables:
HYPOTHESIS_PROFILE: ci
steps:
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
Expand Down Expand Up @@ -156,6 +158,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
vmImage: 'macOS-10.14'
variables:
HYPOTHESIS_PROFILE: ci
steps:
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
Expand Down Expand Up @@ -201,6 +205,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
vmImage: 'macOS-10.14'
variables:
HYPOTHESIS_PROFILE: ci
steps:
# full checkout required
- template: tools/ci/azure/install_chrome.yml
Expand Down Expand Up @@ -264,6 +270,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'windows-2019'
variables:
HYPOTHESIS_PROFILE: ci
steps:
- task: UsePythonVersion@0
inputs:
Expand All @@ -280,6 +288,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'windows-2019'
variables:
HYPOTHESIS_PROFILE: ci
steps:
- task: UsePythonVersion@0
inputs:
Expand Down Expand Up @@ -314,6 +324,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
vmImage: 'windows-2019'
variables:
HYPOTHESIS_PROFILE: ci
steps:
- task: UsePythonVersion@0
inputs:
Expand Down Expand Up @@ -364,6 +376,8 @@ jobs:
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
vmImage: 'windows-2019'
variables:
HYPOTHESIS_PROFILE: ci
steps:
# full checkout required
- task: UsePythonVersion@0
Expand Down
2 changes: 1 addition & 1 deletion testing/web-platform/tests/tools/ci/azure/tox_pytest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
directory: ''
toxenv: 'ALL'

steps:
- template: pip_install.yml
parameters:
Expand Down
19 changes: 14 additions & 5 deletions testing/web-platform/tests/tools/manifest/item.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os.path
from inspect import isabstract
from six import iteritems, with_metaclass
from six.moves.urllib.parse import urljoin, urlparse
Expand Down Expand Up @@ -60,6 +61,11 @@ def item_type(self):
"""The item's type"""
pass

@property
def path_parts(self):

return tuple(self.path.split(os.path.sep))

def key(self):

"""A unique identifier for the test"""
Expand Down Expand Up @@ -110,7 +116,7 @@ def __init__(self,
super(URLManifestItem, self).__init__(tests_root, path)
assert url_base[0] == "/"
self.url_base = url_base
assert url[0] != "/"
assert url is None or url[0] != "/"
self._url = url
self._extras = extras

Expand All @@ -122,10 +128,11 @@ def id(self):
@property
def url(self):

rel_url = self._url or self.path.replace(os.path.sep, u"/")

if self.url_base == "/":
return "/" + self._url
return urljoin(self.url_base, self._url)
return "/" + rel_url
return urljoin(self.url_base, rel_url)

@property
def https(self):
Expand All @@ -135,7 +142,8 @@ def https(self):

def to_json(self):

rv = (self._url, {})
rel_url = None if self._url == self.path.replace(os.path.sep, u"/") else self._url
rv = (rel_url, {})
return rv

@classmethod
Expand Down Expand Up @@ -249,7 +257,8 @@ def fuzzy(self):

def to_json(self):

rv = (self._url, self.references, {})
rel_url = None if self._url == self.path else self._url
rv = (rel_url, self.references, {})
extras = rv[-1]
if self.timeout is not None:
extras["timeout"] = self.timeout
Expand Down
Loading

0 comments on commit 7407d2f

Please sign in to comment.