Skip to content

Commit 7ba3043

Browse files
committed
Refactor
1 parent 42ce638 commit 7ba3043

File tree

2 files changed

+64
-36
lines changed

2 files changed

+64
-36
lines changed

.taskcluster.yml

Lines changed: 45 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -67,39 +67,52 @@ tasks:
6767
- -c
6868
- "~/provision.sh ${browser.name}-${browser.channel} ${event.repository.url} ${event.ref} ${event.after} &&
6969
cd ~/web-platform-tests &&
70-
./tools/ci/ci_taskcluster.sh ${browser.name} ${chunk[0]} ${chunk[1]} ${chunk[2]}"
70+
./tools/ci/ci_taskcluster.sh ${browser.name} --test-type=${chunk[0]} --this-chunk=${chunk[1]} --total-chunks=${chunk[2]}"
7171
- $if: tasks_for == "github-pull-request"
7272
then:
7373
$map: [{name: firefox, channel: nightly}, {name: chrome, channel: dev}]
7474
each(browser):
75-
taskId: {$eval: 'as_slugid(browser.name)'}
76-
taskGroupId: {$eval: 'as_slugid("task group")'}
77-
created: {$fromNow: ''}
78-
deadline: {$fromNow: '24 hours'}
79-
provisionerId: aws-provisioner-v1
80-
# Contributors interested in configurating TaskCluster to run
81-
# against their fork of WPT should change the `workerType` to
82-
# "github-worker".
83-
workerType: github-worker
84-
metadata:
85-
name: wpt-${browser.name}-${browser.channel}-stability
86-
description: >-
87-
Verify that tests modified in a pull request are stable when
88-
executed in ${browser.name}.
89-
owner: ${event.pull_request.user.login}@users.noreply.github.com
90-
source: ${event.repository.url}
91-
payload:
92-
image: jugglinmike/web-platform-tests:0.17
93-
maxRunTime: 7200
94-
artifacts:
95-
public/results:
96-
path: /home/test/artifacts
97-
type: directory
98-
command:
99-
- /bin/bash
100-
- --login
101-
- -c
102-
- "set -e
103-
~/provision.sh ${browser.name}-${browser.channel} ${event.repository.url} refs/pull/${event.number}/head
104-
cd ~/web-platform-tests
105-
./wpt check-stability ${browser.name} --metadata ~/meta/ --install-fonts"
75+
$map:
76+
- name: wpt-${browser.name}-${browser.channel}-stability
77+
description: >-
78+
Verify that tests modified in a pull request are stable when
79+
executed in ${browser.name}.
80+
command: >-
81+
./wpt tests-affected | \
82+
xargs ./tools/ci/ci_taskcluster.sh ${browser.name} --verify
83+
- name: wpt-${browser.name}-${browser.channel}-results
84+
description: >-
85+
Collect results for modified tests in ${browser.name}.
86+
command: >-
87+
./wpt tests-affected | \
88+
xargs ./tools/ci/ci_taskcluster.sh ${browser.name}
89+
each(operation):
90+
taskId: {$eval: 'as_slugid(browser.name)'}
91+
taskGroupId: {$eval: 'as_slugid("task group")'}
92+
created: {$fromNow: ''}
93+
deadline: {$fromNow: '24 hours'}
94+
provisionerId: aws-provisioner-v1
95+
# Contributors interested in configurating TaskCluster to run
96+
# against their fork of WPT should change the `workerType` to
97+
# "github-worker".
98+
workerType: github-worker
99+
metadata:
100+
name: ${operation.name}
101+
description: ${operation.description}
102+
owner: ${event.pull_request.user.login}@users.noreply.github.com
103+
source: ${event.repository.url}
104+
payload:
105+
image: jugglinmike/web-platform-tests:0.17
106+
maxRunTime: 7200
107+
artifacts:
108+
public/results:
109+
path: /home/test/artifacts
110+
type: directory
111+
command:
112+
- /bin/bash
113+
- --login
114+
- -c
115+
- "set -e
116+
~/provision.sh ${browser.name}-${browser.channel} ${event.repository.url} refs/pull/${event.number}/head
117+
cd ~/web-platform-tests
118+
${operation.command}"

tools/ci/ci_taskcluster.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,24 @@
22

33
./wpt manifest-download
44

5-
if [ $1 == "firefox" ]; then
6-
./wpt run firefox --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --install-browser --no-pause --no-restart-on-unexpected --reftest-internal --install-fonts --no-fail-on-unexpected
7-
elif [ $1 == "chrome" ]; then
8-
./wpt run chrome --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --no-pause --no-restart-on-unexpected --install-fonts --no-fail-on-unexpected
5+
browser_specific_args=''
6+
7+
if [ $1 == 'firefox' ]; then
8+
browser_specific_args='--install-browser --reftest-internal'
99
fi
10+
11+
./wpt run \
12+
$@ \
13+
$browser_specific_args \
14+
--log-tbpl=../artifacts/log_tbpl.log \
15+
--log-tbpl-level=info \
16+
--log-wptreport=../artifacts/wpt_report.json \
17+
--log-mach=- \
18+
--this-chunk=$3 --total-chunks=$4 --test-type=$2 \
19+
-y \
20+
--no-pause \
21+
--no-restart-on-unexpected \
22+
--install-fonts \
23+
--no-fail-on-unexpected
24+
1025
gzip ../artifacts/wpt_report.json

0 commit comments

Comments
 (0)