Index: third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh b/third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh |
index 5c536237a0dbbf672e5a1626b9a54068ec7601c9..87b446c43de60b64a4458c80849185aa2e2ca130 100644 |
--- a/third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh |
@@ -1,9 +1,7 @@ |
set -e |
-export BUILD_HOME=$HOME/build |
-export WPT_HOME=$BUILD_HOME/w3c/web-platform-tests |
- |
hosts_fixup() { |
+ echo "travis_fold:start:hosts_fixup" |
echo "== /etc/hosts ==" |
cat /etc/hosts |
echo "----------------" |
@@ -19,104 +17,16 @@ hosts_fixup() { |
echo "== /etc/hosts ==" |
cat /etc/hosts |
echo "----------------" |
+ echo "travis_fold:end:hosts_fixup" |
} |
-fetch_master() { |
- cd $WPT_HOME |
- git fetch https://github.com/w3c/web-platform-tests.git master:master |
-} |
- |
-build_manifest() { |
- cd $WPT_HOME |
- python manifest |
-} |
- |
-install_wptrunner() { |
- cd $BUILD_HOME |
- if [ ! -d w3c/wptrunner ]; then |
- git clone --depth 1 https://github.com/w3c/wptrunner.git w3c/wptrunner |
- cd w3c/wptrunner |
- else |
- cd w3c/wptrunner |
- git fetch https://github.com/w3c/wptrunner.git |
- fi |
- git reset --hard origin/master |
- git submodule update --init --recursive |
- pip install . |
-} |
- |
-install_firefox() { |
- cd $BUILD_HOME |
- pip install -r w3c/wptrunner/requirements_firefox.txt |
- wget https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-52.0a1.en-US.linux-x86_64.tar.bz2 |
- tar -xf firefox-52.0a1.en-US.linux-x86_64.tar.bz2 |
- |
- if [ ! -d profiles ]; then |
- mkdir profiles |
- fi |
- cd profiles |
- wget https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/profiles/prefs_general.js |
-} |
- |
-install_geckodriver() { |
- cd $BUILD_HOME |
- local release_url |
- local tmpfile |
- local release_data |
- # Stupid hacky way of getting the release URL from the GitHub API |
- tmpfile=$(mktemp) |
- echo 'import json, sys |
-data = json.load(sys.stdin) |
-print (item["browser_download_url"] for item in data["assets"] |
- if "linux64" in item["browser_download_url"]).next()' > "$tmpfile" |
- release_data=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest?access_token=$GH_TOKEN) |
- echo $RELEASE_DATA |
- release_url=$(echo $release_data | python $tmpfile) |
- rm "$tmpfile" |
- wget "$release_url" |
- tar xf geckodriver*.tar.gz |
-} |
- |
-install_chrome() { |
- cd $BUILD_HOME |
- local latest |
- pip install -r w3c/wptrunner/requirements_chrome.txt |
- latest=$(curl https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media) |
- curl "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F$latest%2Fchrome-linux.zip?alt=media" > chrome-linux64.zip |
- unzip -q chrome-linux64.zip |
-} |
- |
-install_chromedriver() { |
- cd $BUILD_HOME |
- local latest |
- latest=$(curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE) |
- wget "http://chromedriver.storage.googleapis.com/$latest/chromedriver_linux64.zip" |
- unzip -q chromedriver_linux64.zip |
-} |
test_stability() { |
- cd $WPT_HOME |
- python check_stability.py --root $BUILD_HOME --comment-pr ${TRAVIS_PULL_REQUEST} --gh-token ${GH_TOKEN} $PRODUCT |
+ python check_stability.py $PRODUCT |
} |
main() { |
- fetch_master |
- build_manifest |
- install_wptrunner |
- case "$PRODUCT" in |
- firefox) |
- install_firefox |
- install_geckodriver |
- ;; |
- chrome) |
- hosts_fixup |
- install_chrome |
- install_chromedriver |
- ;; |
- *) |
- echo "Unrecognised product $PRODUCT" |
- exit 1 |
- esac |
+ hosts_fixup |
test_stability |
} |