2016-04-28 20:50:03 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
set -u -e -o pipefail
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
# Setup environment
|
2017-03-05 04:49:10 -05:00
|
|
|
readonly thisDir=$(cd $(dirname $0); pwd)
|
|
|
|
source ${thisDir}/_travis-fold.sh
|
|
|
|
|
|
|
|
|
|
|
|
# If the previous commands in the `script` section of .travis.yaml failed, then abort.
|
|
|
|
# The variable is not set in early stages of the build, so we default to 0 there.
|
|
|
|
# https://docs.travis-ci.com/user/environment-variables/
|
|
|
|
if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then
|
|
|
|
exit 1;
|
|
|
|
fi
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
case ${CI_MODE} in
|
|
|
|
js)
|
2017-03-05 04:49:10 -05:00
|
|
|
${thisDir}/test-js.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
;;
|
|
|
|
e2e)
|
2017-03-05 04:49:10 -05:00
|
|
|
${thisDir}/test-e2e.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
;;
|
|
|
|
saucelabs_required)
|
2017-03-05 04:49:10 -05:00
|
|
|
${thisDir}/test-saucelabs.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
;;
|
|
|
|
browserstack_required)
|
2017-03-05 04:49:10 -05:00
|
|
|
${thisDir}/test-browserstack.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
;;
|
|
|
|
saucelabs_optional)
|
2017-03-05 04:49:10 -05:00
|
|
|
${thisDir}/test-saucelabs.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
;;
|
|
|
|
browserstack_optional)
|
2017-03-05 04:49:10 -05:00
|
|
|
${thisDir}/test-browserstack.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
;;
|
|
|
|
esac
|