github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/tools/integration/run_all.sh (about) 1 #!/bin/bash 2 3 set -ex 4 5 DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 6 # shellcheck disable=SC1090 7 . "$DIR/config.sh" 8 9 whitely echo Sanity checks 10 if ! bash "$DIR/sanity_check.sh"; then 11 whitely echo ...failed 12 exit 1 13 fi 14 whitely echo ...ok 15 16 # shellcheck disable=SC2068 17 TESTS=(${@:-$(find . -name '*_test.sh')}) 18 RUNNER_ARGS=() 19 20 # If running on circle, use the scheduler to work out what tests to run 21 if [ -n "$CIRCLECI" ] && [ -z "$NO_SCHEDULER" ]; then 22 RUNNER_ARGS=("${RUNNER_ARGS[@]}" -scheduler) 23 fi 24 25 # If running on circle or PARALLEL is not empty, run tests in parallel 26 if [ -n "$CIRCLECI" ] || [ -n "$PARALLEL" ]; then 27 RUNNER_ARGS=("${RUNNER_ARGS[@]}" -parallel) 28 fi 29 30 make -C "${DIR}/../runner" 31 HOSTS="$HOSTS" "${DIR}/../runner/runner" "${RUNNER_ARGS[@]}" "${TESTS[@]}"