e7d49ddd7c
BUG= R=rnystrom@google.com Review URL: https://codereview.chromium.org/2132593003 . Committed: https://github.com/dart-lang/dev_compiler/commit/79160a056c0a35adef3542ae4e30fdc451d83612
38 lines
1.1 KiB
Bash
Executable File
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
|