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

Unified Diff: tool/browser_test.sh

Issue 1208413003: Run canary tests in presubmit (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « .travis.yml ('k') | tool/presubmit.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/browser_test.sh
diff --git a/tool/browser_test.sh b/tool/browser_test.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6827e3e3fce969b9665215be60450de5e3e2c3d3
--- /dev/null
+++ b/tool/browser_test.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Check that node exists and refers to nodejs
+checknodejs=$(hash node 2> /dev/null && node --help | grep nodejs)
+if [[ $? -ne 0 ]]; then
+ echo 'NodeJS (node) is not properly installed'
+ echo 'Note, on Ubuntu / Debian, you may need to also install:'
+ echo '$ sudo apt-get install nodejs-legacy'
+ exit 1
+fi
+
+# Check that npm is installed
+checknpm=$(hash npm 2> /dev/null)
+if [[ $? -ne 0 ]]; then
+ echo 'Node Package Manager (npm) is not properly installed'
+ exit 1
+fi
+
+# Check for Chrome Canary on Ubuntu
+# The default install path is sometimes google-chrome-unstable
+# instead of google-chrome-canary as karma expects.
+if [[ "$OSTYPE" == "linux-gnu" ]] && [[ -z "$CHROME_CANARY_BIN" ]]; then
+ checkcanary=$(hash google-chrome-canary 2> /dev/null)
+ if [[ $? -ne 0 ]]; then
+ checkunstable=$(hash google-chrome-unstable 2> /dev/null)
+ if [[ $? -ne 0 ]]; then
+ echo 'Chrome Canary is not found'
+ echo 'Please install and/or set CHROME_CANARY_BIN to its path'
+ exit 1
+ else
+ export CHROME_CANARY_BIN=google-chrome-unstable
+ fi
+ fi
+fi
+
+npm install
+npm test
« no previous file with comments | « .travis.yml ('k') | tool/presubmit.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698