Files
sdk/pkg/dev_compiler/tool/browser_test.sh
T
John Messerly 8422d7ab48 fix language_tests.js to use strict mode
we weren't running a bunch of tests on the bots :|
amazingly, none were broken yet
this also fixes karma.conf log level, and disables some spammy prints from one of the tests

R=vsm@google.com

Review URL: https://codereview.chromium.org/1257233008 .
2015-08-03 14:08:28 -07:00

38 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Check that node exists and refers to nodejs
checknodejs=$(hash node 2> /dev/null && node --help | grep js)
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