|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 4 | +NC='\033[0m' |
| 5 | +GREEN='\033[0;32m' |
| 6 | +RED='\033[0;31m' |
| 7 | + |
| 8 | +run_test_local() { |
| 9 | + # runs the tests locally |
| 10 | + set +e |
| 11 | + SECONDS=0 |
| 12 | + TEST_ARG=$@ |
| 13 | + echo "running test $TEST_ARG" |
| 14 | + RES=$($TEST_ARG 2>&1) |
| 15 | + RESPONSE_CODE=$? |
| 16 | + DURATION=$SECONDS |
| 17 | + if [ $RESPONSE_CODE -eq 0 ]; then |
| 18 | + echo -e "${GREEN} Test \"$TEST_ARG\" successful ($DURATION sec) $NC" |
| 19 | + else |
| 20 | + echo -e "${RED} Test \"$TEST_ARG\" failed $NC ($DURATION sec) $NC" |
| 21 | + return $RESPONSE_CODE |
| 22 | + fi |
| 23 | +} |
| 24 | + |
| 25 | +run_in_test_repo() { |
| 26 | + local test_command=$1 |
| 27 | + |
| 28 | + cd "${dir}"/test_dt_patches |
| 29 | + ${test_command} |
| 30 | + RESPONSE_CODE=$? |
| 31 | + cd ../.. |
| 32 | + |
| 33 | + return $RESPONSE_CODE |
| 34 | +} |
| 35 | + |
| 36 | +test_compiler_patch() { |
| 37 | + local SCALA_VERSION="$1" |
| 38 | + |
| 39 | + run_in_test_repo "bazel build //... --repo_env=SCALA_VERSION=${SCALA_VERSION} //..." |
| 40 | +} |
| 41 | + |
| 42 | +#run_test_local test_compiler_patch 2.11.0 |
| 43 | +#run_test_local test_compiler_patch 2.11.1 |
| 44 | +#run_test_local test_compiler_patch 2.11.2 |
| 45 | +#run_test_local test_compiler_patch 2.11.3 |
| 46 | +#run_test_local test_compiler_patch 2.11.4 |
| 47 | +#run_test_local test_compiler_patch 2.11.5 |
| 48 | +#run_test_local test_compiler_patch 2.11.6 |
| 49 | +#run_test_local test_compiler_patch 2.11.7 |
| 50 | +#run_test_local test_compiler_patch 2.11.8 |
| 51 | +#run_test_local test_compiler_patch 2.11.9 |
| 52 | +#run_test_local test_compiler_patch 2.11.10 |
| 53 | +#run_test_local test_compiler_patch 2.11.11 |
| 54 | +run_test_local test_compiler_patch 2.11.12 |
| 55 | + |
| 56 | +#run_test_local test_compiler_patch 2.12.0 |
| 57 | +run_test_local test_compiler_patch 2.12.1 |
| 58 | +run_test_local test_compiler_patch 2.12.2 |
| 59 | +run_test_local test_compiler_patch 2.12.3 |
| 60 | +run_test_local test_compiler_patch 2.12.4 |
| 61 | +run_test_local test_compiler_patch 2.12.5 |
| 62 | +run_test_local test_compiler_patch 2.12.6 |
| 63 | +run_test_local test_compiler_patch 2.12.7 |
| 64 | +run_test_local test_compiler_patch 2.12.8 |
| 65 | +run_test_local test_compiler_patch 2.12.9 |
| 66 | +run_test_local test_compiler_patch 2.12.10 |
| 67 | +run_test_local test_compiler_patch 2.12.11 |
| 68 | +run_test_local test_compiler_patch 2.12.12 |
| 69 | +run_test_local test_compiler_patch 2.12.13 |
| 70 | +run_test_local test_compiler_patch 2.12.14 |
| 71 | +run_test_local test_compiler_patch 2.12.15 |
| 72 | +run_test_local test_compiler_patch 2.12.16 |
| 73 | + |
| 74 | +run_test_local test_compiler_patch 2.13.0 |
| 75 | +run_test_local test_compiler_patch 2.13.1 |
| 76 | +run_test_local test_compiler_patch 2.13.2 |
| 77 | +run_test_local test_compiler_patch 2.13.3 |
| 78 | +run_test_local test_compiler_patch 2.13.4 |
| 79 | +run_test_local test_compiler_patch 2.13.5 |
| 80 | +run_test_local test_compiler_patch 2.13.6 |
| 81 | +run_test_local test_compiler_patch 2.13.7 |
| 82 | +run_test_local test_compiler_patch 2.13.8 |
0 commit comments