Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh

Issue 2434563008: Import wpt@26c8d4e87448d1c4e5ebf2ddb4917c0633c201db (Closed)
Patch Set: Mark one more test as potentially timing out Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 set -e
2
3 export BUILD_HOME=$HOME/build
4 export WPT_HOME=$BUILD_HOME/w3c/web-platform-tests
5
6 hosts_fixup() {
7 echo "== /etc/hosts =="
8 cat /etc/hosts
9 echo "----------------"
10 sudo sed -i 's/^::1\s*localhost/::1/' /etc/hosts
11 sudo sh -c 'echo "
12 127.0.0.1 web-platform.test
13 127.0.0.1 www.web-platform.test
14 127.0.0.1 www1.web-platform.test
15 127.0.0.1 www2.web-platform.test
16 127.0.0.1 xn--n8j6ds53lwwkrqhv28a.web-platform.test
17 127.0.0.1 xn--lve-6lad.web-platform.test
18 " >> /etc/hosts'
19 echo "== /etc/hosts =="
20 cat /etc/hosts
21 echo "----------------"
22 }
23
24 fetch_master() {
25 cd $WPT_HOME
26 git fetch https://github.com/w3c/web-platform-tests.git master:master
27 }
28
29 build_manifest() {
30 cd $WPT_HOME
31 python manifest
32 }
33
34 install_wptrunner() {
35 cd $BUILD_HOME
36 if [ ! -d w3c/wptrunner ]; then
37 git clone --depth 1 https://github.com/w3c/wptrunner.git w3c/wptrunner
38 cd w3c/wptrunner
39 else
40 cd w3c/wptrunner
41 git fetch https://github.com/w3c/wptrunner.git
42 fi
43 git reset --hard origin/master
44 git submodule update --init --recursive
45 pip install .
46 }
47
48 install_firefox() {
49 cd $BUILD_HOME
50 pip install -r w3c/wptrunner/requirements_firefox.txt
51 wget https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ firefox-52.0a1.en-US.linux-x86_64.tar.bz2
52 tar -xf firefox-52.0a1.en-US.linux-x86_64.tar.bz2
53
54 if [ ! -d profiles ]; then
55 mkdir profiles
56 fi
57 cd profiles
58 wget https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/profiles/pr efs_general.js
59 }
60
61 install_geckodriver() {
62 cd $BUILD_HOME
63 local release_url
64 local tmpfile
65 local release_data
66 # Stupid hacky way of getting the release URL from the GitHub API
67 tmpfile=$(mktemp)
68 echo 'import json, sys
69 data = json.load(sys.stdin)
70 print (item["browser_download_url"] for item in data["assets"]
71 if "linux64" in item["browser_download_url"]).next()' > "$tmpfile"
72 release_data=$(curl -s https://api.github.com/repos/mozilla/geckodriver/rele ases/latest?access_token=$GH_TOKEN)
73 echo $RELEASE_DATA
74 release_url=$(echo $release_data | python $tmpfile)
75 rm "$tmpfile"
76 wget "$release_url"
77 tar xf geckodriver*.tar.gz
78 }
79
80 install_chrome() {
81 cd $BUILD_HOME
82 local latest
83 pip install -r w3c/wptrunner/requirements_chrome.txt
84 latest=$(curl https://www.googleapis.com/download/storage/v1/b/chromium-brow ser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media)
85 curl "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snap shots/o/Linux_x64%2F$latest%2Fchrome-linux.zip?alt=media" > chrome-linux64.zip
86 unzip -q chrome-linux64.zip
87 }
88
89 install_chromedriver() {
90 cd $BUILD_HOME
91 local latest
92 latest=$(curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE)
93 wget "http://chromedriver.storage.googleapis.com/$latest/chromedriver_linux6 4.zip"
94 unzip -q chromedriver_linux64.zip
95 }
96
97 test_stability() {
98 cd $WPT_HOME
99 python check_stability.py --root $BUILD_HOME --comment-pr ${TRAVIS_PULL_REQU EST} --gh-token ${GH_TOKEN} $PRODUCT
100 }
101
102 main() {
103 fetch_master
104 build_manifest
105 install_wptrunner
106 case "$PRODUCT" in
107 firefox)
108 install_firefox
109 install_geckodriver
110 ;;
111 chrome)
112 hosts_fixup
113 install_chrome
114 install_chromedriver
115 ;;
116 *)
117 echo "Unrecognised product $PRODUCT"
118 exit 1
119 esac
120 test_stability
121 }
122
123 main
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698