mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 78f764c05c229883e87ad135c7153051a66e2851
This commit is contained in:
parent
55347aa39f
commit
bf84a079f9
1983 changed files with 58006 additions and 31437 deletions
37
tests/wpt/web-platform-tests/tools/taskcluster/verify.py
Normal file
37
tests/wpt/web-platform-tests/tools/taskcluster/verify.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
import argparse
|
||||
import json
|
||||
import os
|
||||
|
||||
import jsone
|
||||
import yaml
|
||||
|
||||
here = os.path.dirname(__file__)
|
||||
root = os.path.abspath(os.path.join(here, "..", ".."))
|
||||
|
||||
|
||||
def create_parser():
|
||||
return argparse.ArgumentParser()
|
||||
|
||||
|
||||
def run(venv, **kwargs):
|
||||
with open(os.path.join(root, ".taskcluster.yml")) as f:
|
||||
template = yaml.safe_load(f)
|
||||
|
||||
events = [("pr_event.json", "github-pull-request", "Pull Request"),
|
||||
("master_push_event.json", "github-push", "Push to master")]
|
||||
|
||||
for filename, tasks_for, title in events:
|
||||
with open(os.path.join(here, "testdata", filename)) as f:
|
||||
event = json.load(f)
|
||||
|
||||
context = {"tasks_for": tasks_for,
|
||||
"event": event,
|
||||
"as_slugid": lambda x: x}
|
||||
|
||||
data = jsone.render(template, context)
|
||||
heading = "Got %s tasks for %s" % (len(data["tasks"]), title)
|
||||
print(heading)
|
||||
print("=" * len(heading))
|
||||
for item in data["tasks"]:
|
||||
print(json.dumps(item, indent=2))
|
||||
print("")
|
Loading…
Add table
Add a link
Reference in a new issue