Skip to content

Commit 61400d3

Browse files
ted-xiecopybara-github
authored andcommitted
Merge #405 by ted-xie: Use rules_shell for bash runfiles library
Also removes a no-longer-necessary abseil dep. Closes #405 COPYBARA_INTEGRATE_REVIEW=#405 from ted-xie:bash_runfiles c218142 PiperOrigin-RevId: 794617718 Change-Id: I27ce9e11270066a297f98acd3c92a88006d1f641
1 parent 913f7c0 commit 61400d3

7 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/validations/validate_manifest/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ licenses(["notice"])
1515
py_library(
1616
name = "validate_manifest_lib",
1717
srcs = ["validate_manifest.py"],
18-
deps = ["@bazel_tools//third_party/py/abseil"],
1918
)
2019

2120
py_test(

test/bashunit/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ py_test(
3232
":bashunit",
3333
# This test relies on writing shell scripts that use bash runfiles
3434
# to load the actual copy of unittest.bash being tested.
35-
"@bazel_tools//tools/bash/runfiles",
35+
"@rules_shell//shell/runfiles",
3636
],
3737
main = "unittest_test.py",
3838
tags = [

test/bashunit/unittest_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@
2929

3030
# The test setup for this external test is forwarded to the internal bash test.
3131
# This allows the internal test to use the same runfiles to load unittest.bash.
32+
# NOTE: runfiles.bash exists in rules_shell, but isn't entirely hooked up yet.
33+
# For now, we still need to reference the "old" runfiles.bash path in the
34+
# bashunit library.
3235
_TEST_PREAMBLE = """
3336
#!/bin/bash
3437
# --- begin runfiles.bash initialization ---
3538
if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
3639
source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash"
3740
else
38-
echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash"
41+
echo >&2 "ERROR: cannot find @rules_shell//shell/runfiles:runfiles.bash"
3942
exit 1
4043
fi
4144
# --- end runfiles.bash initialization ---

test/rules/android_sdk_repository/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sh_library(
2727
visibility = ["//visibility:private"],
2828
deps = [
2929
"//test/bashunit",
30-
"@bazel_tools//tools/bash/runfiles",
30+
"@rules_shell//shell/runfiles",
3131
],
3232
)
3333

@@ -41,7 +41,7 @@ script_test(
4141
deps = [
4242
":android_helper",
4343
"//test/bashunit",
44-
"@bazel_tools//tools/bash/runfiles",
44+
"@rules_shell//shell/runfiles",
4545
],
4646
)
4747

test/utils/integration_demo/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ script_test(
2020
tags = ["manual"],
2121
deps = [
2222
"//test/bashunit",
23-
"@bazel_tools//tools/bash/runfiles",
23+
"@rules_shell//shell/runfiles",
2424
],
2525
)
2626

tools/android/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ sh_binary(
188188
":r8",
189189
":tracereferences",
190190
":zip",
191-
"@bazel_tools//tools/bash/runfiles",
191+
"@rules_shell//shell/runfiles",
192192
],
193193
visibility = ["//visibility:public"],
194194
)
@@ -222,7 +222,7 @@ sh_binary(
222222
":d8_desugar_params",
223223
":full_desugar_jdk_libs_config_json",
224224
"//src/tools/java/com/google/devtools/build/android/r8:desugar",
225-
"@bazel_tools//tools/bash/runfiles",
225+
"@rules_shell//shell/runfiles",
226226
],
227227
visibility = ["//visibility:public"],
228228
)

tools/jdk/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sh_test(
6666
"//src/tools/jar_to_module_info",
6767
],
6868
deps = [
69-
"@bazel_tools//tools/bash/runfiles",
69+
"@rules_shell//shell/runfiles",
7070
],
7171
)
7272

0 commit comments

Comments
 (0)