-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1442092 [wpt PR 9726] - Test serve start config, a=testonly
Automatic update from web-platform-testsRewrite the code to parametrise over products -- Add test to check that serve.start gets called with right host -- Test all wptrunner environments -- Fix #9750: bind_hostname needs to be a Python bool db55c167d484d0e34fd618960887161522280d47 fixed this for Servo; "true"/"false" worked when it was interpolated as JSON, but that is no longer the case since cb2d75f (#9480). -- Use default value of bind_hostname unless we need to override it wpt-commits: e21bdf0b8778ac6c3467de97b09d0e88591e7ee8, 7787a28414acd7e8e75af2e7e05cbaec28f64853, 35261cc5571f5ad2c34c096eb48433497f1db82d, 8fd41644484ab9064017ee773dc96e3a881a7448, 88f08cce716ce4b97e3da5260144ce9d8a81cc33 wpt-pr: 9726 wpt-commits: e21bdf0b8778ac6c3467de97b09d0e88591e7ee8, 7787a28414acd7e8e75af2e7e05cbaec28f64853, 35261cc5571f5ad2c34c096eb48433497f1db82d, 8fd41644484ab9064017ee773dc96e3a881a7448, 88f08cce716ce4b97e3da5260144ce9d8a81cc33 wpt-pr: 9726
- Loading branch information
Showing
14 changed files
with
118 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
testing/web-platform/tests/tools/wptrunner/wptrunner/tests/base.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import os | ||
import sys | ||
|
||
from os.path import dirname, join | ||
|
||
import pytest | ||
|
||
sys.path.insert(0, join(dirname(__file__), "..", "..")) | ||
|
||
from wptrunner import browsers | ||
|
||
|
||
_products = browsers.product_list | ||
_active_products = set() | ||
|
||
if "CURRENT_TOX_ENV" in os.environ: | ||
current_tox_env_split = os.environ["CURRENT_TOX_ENV"].split("-") | ||
|
||
tox_env_extra_browsers = { | ||
"chrome": {"chrome_android"}, | ||
"servo": {"servodriver"}, | ||
} | ||
|
||
_active_products = set(_products) & set(current_tox_env_split) | ||
for product in frozenset(_active_products): | ||
_active_products |= tox_env_extra_browsers.get(product, set()) | ||
else: | ||
_active_products = set(_products) | ||
|
||
|
||
class all_products(object): | ||
def __init__(self, arg, marks={}): | ||
self.arg = arg | ||
self.marks = marks | ||
|
||
def __call__(self, f): | ||
params = [] | ||
for product in _products: | ||
if product in self.marks: | ||
params.append(pytest.param(product, marks=self.marks[product])) | ||
else: | ||
params.append(product) | ||
return pytest.mark.parametrize(self.arg, params)(f) | ||
|
||
|
||
class active_products(object): | ||
def __init__(self, arg, marks={}): | ||
self.arg = arg | ||
self.marks = marks | ||
|
||
def __call__(self, f): | ||
params = [] | ||
for product in _products: | ||
if product not in _active_products: | ||
params.append(pytest.param(product, marks=pytest.mark.skip(reason="wrong toxenv"))) | ||
elif product in self.marks: | ||
params.append(pytest.param(product, marks=self.marks[product])) | ||
else: | ||
params.append(product) | ||
return pytest.mark.parametrize(self.arg, params)(f) |
41 changes: 0 additions & 41 deletions
41
testing/web-platform/tests/tools/wptrunner/wptrunner/tests/conftest.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters