diff --git a/test/shell/test_coverage_equals_in_target.sh b/test/shell/test_coverage_equals_in_target.sh index 7dbaaa471..2f37fa8e8 100755 --- a/test/shell/test_coverage_equals_in_target.sh +++ b/test/shell/test_coverage_equals_in_target.sh @@ -4,6 +4,7 @@ dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . "${dir}"/test_helper.sh runner=$(get_test_runner "${1:-local}") +# Default to 2.12.19 for `diff` tests because other versions change the output. SCALA_VERSION="${SCALA_VERSION:-2.12.19}" test_coverage_target_name_contains_equals_sign() { diff --git a/test/shell/test_coverage_scalatest.sh b/test/shell/test_coverage_scalatest.sh index e81dbea63..e29b6adc2 100755 --- a/test/shell/test_coverage_scalatest.sh +++ b/test/shell/test_coverage_scalatest.sh @@ -4,6 +4,7 @@ dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . "${dir}"/test_helper.sh runner=$(get_test_runner "${1:-local}") +# Default to 2.12.19 for `diff` tests because other versions change the output. SCALA_VERSION="${SCALA_VERSION:-2.12.19}" test_coverage_on() { diff --git a/test/shell/test_coverage_scalatest_resources.sh b/test/shell/test_coverage_scalatest_resources.sh index cef6e690e..08bb38b74 100755 --- a/test/shell/test_coverage_scalatest_resources.sh +++ b/test/shell/test_coverage_scalatest_resources.sh @@ -4,6 +4,7 @@ dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . "${dir}"/test_helper.sh runner=$(get_test_runner "${1:-local}") +# Default to 2.12.19 for `diff` tests because other versions change the output. SCALA_VERSION="${SCALA_VERSION:-2.12.19}" test_coverage_succeeds_resource_call() { @@ -16,7 +17,6 @@ test_coverage_succeeds_resource_call() { test_coverage_includes_resource_test_targets() { bazel coverage \ - --repo_env="SCALA_VERSION=${SCALA_VERSION}" \ --instrument_test_targets=True \ //test/coverage_scalatest_resources/consumer:tests grep -q "SF:test/coverage_scalatest_resources/consumer/src/test/scala/com/example/consumer/ConsumerSpec.scala" $(bazel info bazel-testlogs)/test/coverage_scalatest_resources/consumer/tests/coverage.dat diff --git a/test/shell/test_coverage_specs2_with_junit.sh b/test/shell/test_coverage_specs2_with_junit.sh index f962a00f1..725eecccd 100755 --- a/test/shell/test_coverage_specs2_with_junit.sh +++ b/test/shell/test_coverage_specs2_with_junit.sh @@ -4,6 +4,7 @@ dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . "${dir}"/test_helper.sh runner=$(get_test_runner "${1:-local}") +# Default to 2.12.19 for `diff` tests because other versions change the output. SCALA_VERSION="${SCALA_VERSION:-2.12.19}" test_coverage_on() { @@ -15,7 +16,6 @@ test_coverage_on() { test_coverage_includes_test_targets() { bazel coverage \ - --repo_env="SCALA_VERSION=${SCALA_VERSION}" \ --instrument_test_targets=True \ //test/coverage_specs2_with_junit:test-specs2-with-junit grep -q "SF:test/coverage_specs2_with_junit/TestWithSpecs2WithJUnit.scala" $(bazel info bazel-testlogs)/test/coverage_specs2_with_junit/test-specs2-with-junit/coverage.dat