Skip to content

Commit 747b660

Browse files
authored
Improve test efficiency, reduce lock file size (#1784)
1 parent c1a8c78 commit 747b660

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

dt_patches/dt_patch_test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ run_in_test_repo() {
1616
cd "${dir}/${test_repo}" || return 1
1717
"${test_command[@]}" || response_code=$?
1818

19-
bazel shutdown
2019
cd ../..
2120
return $response_code
2221
}
@@ -120,6 +119,8 @@ $runner test_compiler_patch 3.5.2
120119
$runner test_compiler_patch 3.6.4
121120
$runner test_compiler_patch 3.7.3
122121

122+
run_in_test_repo 'test_dt_patches' bazel shutdown
123+
123124
$runner test_compiler_srcjar_error 2.12.11
124125
$runner test_compiler_srcjar_error 2.12.12
125126
$runner test_compiler_srcjar_error 2.12.13
@@ -152,3 +153,5 @@ $runner test_compiler_srcjar 3.4.3
152153
$runner test_compiler_srcjar_nonhermetic 3.5.2
153154
$runner test_compiler_srcjar_nonhermetic 3.6.4
154155
$runner test_compiler_srcjar_nonhermetic 3.7.3
156+
157+
run_in_test_repo 'test_dt_patches_user_srcjar' bazel shutdown

dt_patches/test_dt_patches/MODULE.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ scala_deps.settings(
5656
fetch_sources = True,
5757
validate_scala_version = False,
5858
)
59-
scala_deps.scala()
6059

6160
scala_protoc = use_extension(
6261
"@rules_scala//scala/extensions:protoc.bzl",

dt_patches/test_dt_patches_user_srcjar/MODULE.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ scala_deps.settings(
6666
fetch_sources = True,
6767
validate_scala_version = False,
6868
)
69-
scala_deps.scala()
7069

7170
# The `scala_deps.compiler_srcjar()` tag prevents some of the kinds of errors
7271
# represented in the corresponding `WORKSPACE` file, so we have to force

test/compiler_sources_integrity/MODULE.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ scala_deps = use_extension(
2323
"@rules_scala//scala/extensions:deps.bzl",
2424
"scala_deps",
2525
)
26-
scala_deps.scala()
2726
scala_deps.settings(
2827
# Since we're using a bogus Scala version in the compiler_srcjar.
2928
validate_scala_version = False,

test/shell/test_examples.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ run_in_example_dir(){
1717
set -e
1818
cd "examples/${test_dir}"
1919
"$@"
20-
bazel shutdown
20+
21+
# Don't shut down in `scala3` since multiple test cases run there.
22+
if [[ "$test_dir" != 'scala3' ]]; then
23+
bazel shutdown
24+
fi
2125
cd "$dir"
2226
}
2327

0 commit comments

Comments
 (0)