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

Unified Diff: tool/get_chrome_canary.sh

Issue 1672563002: e2e test for transformer (webdriver + pub serve) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix selenium config on travis Created 4 years, 10 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: tool/get_chrome_canary.sh
diff --git a/tool/get_chrome_canary.sh b/tool/get_chrome_canary.sh
index 6d6a7a93c90e242fffdcbe6e8fad1cd2303be050..8f023138ef83392e01e76f805eaae8ba10286507 100755
--- a/tool/get_chrome_canary.sh
+++ b/tool/get_chrome_canary.sh
@@ -10,12 +10,32 @@
set -eu
-readonly CHROME_URL=https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64
-readonly CHROME_REV=$(curl -s ${CHROME_URL}/LAST_CHANGE)
+readonly CHROME_SNAPSHOTS=https://storage.googleapis.com/chromium-browser-snapshots
+declare CHROME_URL
+declare CHROME_NAME
+declare CHROME_RELATIVE_BIN
+
+if [[ "$OSTYPE" == "linux"* ]]; then
+ CHROME_URL=$CHROME_SNAPSHOTS/Linux_x64
+ CHROME_NAME=chrome-linux
+ CHROME_RELATIVE_BIN=chrome
+elif [[ "$OSTYPE" == "darwin"* ]]; then
+ CHROME_URL=$CHROME_SNAPSHOTS/Mac
+ CHROME_NAME=chrome-mac
+ CHROME_RELATIVE_BIN=Chromium.app/Contents/MacOS/Chromium
+elif [[ "$OSTYPE" == "cygwin" ]]; then
+ CHROME_URL=$CHROME_SNAPSHOTS/Win
+ CHROME_NAME=chrome-win32
+ CHROME_RELATIVE_BIN=chrome.exe
+else
+ echo "Unknown platform: $OSTYPE" >&2
+ exit 1
+fi
readonly CHROME_CANARY_DIR=$HOME/.chrome/canary
-readonly CHROME_CANARY_BIN=$CHROME_CANARY_DIR/chrome-linux/chrome
+readonly CHROME_CANARY_BIN=$CHROME_CANARY_DIR/$CHROME_NAME/$CHROME_RELATIVE_BIN
readonly CHROME_CANARY_REV_FILE=$CHROME_CANARY_DIR/VERSION
+readonly CHROME_REV=$(curl -s ${CHROME_URL}/LAST_CHANGE)
function getCanary() {
local existing_version=""
@@ -29,7 +49,7 @@ function getCanary() {
rm -fR $CHROME_CANARY_DIR
mkdir -p $CHROME_CANARY_DIR
- local file=chrome-linux.zip
+ local file=$CHROME_NAME.zip
curl ${CHROME_URL}/${CHROME_REV}/$file -o $file
unzip $file -d $CHROME_CANARY_DIR
rm $file
@@ -39,4 +59,4 @@ function getCanary() {
getCanary >&2
-echo $CHROME_CANARY_BIN
+echo $CHROME_CANARY_BIN
« test/transformer_e2e_test.dart ('K') | « tool/codegen.sh ('k') | tool/transformer_test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698