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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/ci_stability.sh

Issue 2448433002: Import wpt@bd99724e428dae78082983eab4675480c43f6234 (Closed)
Patch Set: more Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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
}

Powered by Google App Engine
This is Rietveld 408576698