Bug 1540048 [wpt PR 16101] - Revert "Don't use HEAD or FETCH_HEAD to checkout specific revisions.", a=testonly

Automatic update from web-platform-tests
Revert "Don't use HEAD or FETCH_HEAD to checkout specific revisions. (#16066)" (#16101)

This reverts commit 856a95f08c3674cf34edbd15cf51d4fbffe84a5c.
--

wpt-commits: fbd91b73ea03f23fffe4717556c088ae344c9501
wpt-pr: 16101
This commit is contained in:
Sam Sneddon 2019-04-18 11:56:13 +00:00 коммит произвёл James Graham
Родитель 091a0d976b
Коммит 6bc2668167
4 изменённых файлов: 32 добавлений и 30 удалений

Просмотреть файл

@ -64,7 +64,7 @@ tasks:
owner: ${event.pusher.email}
source: ${event.repository.url}
payload:
image: harjgam/web-platform-tests:0.32
image: harjgam/web-platform-tests:0.30
maxRunTime: 7200
artifacts:
public/results:
@ -80,7 +80,8 @@ tasks:
echo "wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}";
~/start.sh
${event.repository.url}
${event.ref};
${event.ref}
${event.after};
cd ~/web-platform-tests;
./tools/ci/run_tc.py
--oom-killer
@ -92,7 +93,6 @@ tasks:
./tools/ci/taskcluster-run.py
${browser.name}
--
--checkout=${event.after}
--channel=${browser.channel}
--log-wptreport=../artifacts/wpt_report.json
--log-wptscreenshot=../artifacts/wpt_screenshot.txt
@ -112,15 +112,15 @@ tasks:
$map:
# This is the main place to define new stability checks
- name: wpt-${browser.name}-${browser.channel}-stability
checkout: task_head
diff_base: base_head
checkout: FETCH_HEAD
diff_range: HEAD^
description: >-
Verify that all tests affected by a pull request are stable
when executed in ${browser.name}.
extra_args: '--verify'
- name: wpt-${browser.name}-${browser.channel}-results
checkout: task_head
diff_base: base_head
checkout: FETCH_HEAD
diff_range: HEAD^
description: >-
Collect results for all tests affected by a pull request in
${browser.name}.
@ -129,8 +129,8 @@ tasks:
--log-wptreport=../artifacts/wpt_report.json
--log-wptscreenshot=../artifacts/wpt_screenshot.txt
- name: wpt-${browser.name}-${browser.channel}-results-without-changes
checkout: base_head
diff_base: task_head
checkout: FETCH_HEAD^
diff_range: FETCH_HEAD
description: >-
Collect results for all tests affected by a pull request in
${browser.name} but without the changes in the PR.
@ -156,7 +156,7 @@ tasks:
owner: ${event.pull_request.user.login}@users.noreply.github.com
source: ${event.repository.url}
payload:
image: harjgam/web-platform-tests:0.32
image: harjgam/web-platform-tests:0.30
maxRunTime: 7200
artifacts:
public/results:
@ -178,7 +178,8 @@ tasks:
echo "${operation.name}";
~/start.sh
${event.repository.clone_url}
refs/pull/${event.number}/merge;
refs/pull/${event.number}/merge
FETCH_HEAD;
cd web-platform-tests;
./tools/ci/run_tc.py
--checkout=${operation.checkout}
@ -188,7 +189,7 @@ tasks:
--xvfb
stability
./tools/ci/taskcluster-run.py
--commit-range ${operation.diff_base}
--commit-range ${operation.diff_range}
${browser.name}
--
--channel=${browser.channel}
@ -309,7 +310,7 @@ tasks:
owner: ${event.sender.login}@users.noreply.github.com
source: ${event.repository.url}
payload:
image: harjgam/web-platform-tests:0.32
image: harjgam/web-platform-tests:0.30
maxRunTime: 7200
artifacts:
public/results:
@ -325,6 +326,7 @@ tasks:
echo "${operation.name}";
~/start.sh
${event.repository.clone_url}
${checkout_ref};
${checkout_ref}
FETCH_HEAD;
cd ~/web-platform-tests;
${operation.script};

Просмотреть файл

@ -117,7 +117,7 @@ def make_hosts_file():
def checkout_revision(rev):
subprocess.check_call(["git", "--quiet", "checkout", rev])
subprocess.check_call(["git", "checkout", "-q", rev])
def install_chrome(channel):
@ -233,19 +233,6 @@ def main():
if event:
set_variables(event)
if os.environ.get("GITHUB_PULL_REQUEST", "false") != "false":
parents = run(["git", "show", "--format=%P", "task_head"], return_stdout=True).strip().split()
if len(parents) == 2:
base_head = parents[0]
pr_head = parents[1]
run(["git", "branch", "base_head", base_head])
run(["git", "branch", "pr_head", pr_head])
else:
print("ERROR: Pull request HEAD wasn't a 2-parent merge commit; "
"expected to test the merge of PR into the base")
sys.exit(1)
if os.environ.get("GITHUB_BRANCH"):
# Ensure that the remote base branch exists
# TODO: move this somewhere earlier in the task

Просмотреть файл

@ -0,0 +1 @@
# Contents of this script superceeded by tools/ci/run_tc.py

Просмотреть файл

@ -14,6 +14,9 @@ set -ex
REMOTE=${1:-https://github.com/web-platform-tests/wpt}
REF=${2:-master}
REVISION=${3:-FETCH_HEAD}
BROWSER=${4:-all}
CHANNEL=${5:-nightly}
cd ~
@ -24,6 +27,15 @@ git init
git remote add origin ${REMOTE}
# Initially we just fetch 50 commits in order to save several minutes of fetching
retry git fetch --quiet --depth=50 --tags origin ${REF}:task_head
retry git fetch --quiet --depth=50 --tags origin ${REF}
git checkout --quiet task_head
if [[ ! `git rev-parse --verify -q ${REVISION}` ]];
then
# But if for some reason the commit under test isn't in that range, we give in and
# fetch everything
retry git fetch -q --unshallow ${REMOTE}
git rev-parse --verify ${REVISION}
fi
git checkout -b build ${REVISION}
source tools/ci/start.sh