diff options
Diffstat (limited to 'examples/bzlmod/runfiles/BUILD.bazel')
-rw-r--r-- | examples/bzlmod/runfiles/BUILD.bazel | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/bzlmod/runfiles/BUILD.bazel b/examples/bzlmod/runfiles/BUILD.bazel new file mode 100644 index 0000000..add56b3 --- /dev/null +++ b/examples/bzlmod/runfiles/BUILD.bazel @@ -0,0 +1,18 @@ +load("@rules_python//python:defs.bzl", "py_test") + +py_test( + name = "runfiles_test", + srcs = ["runfiles_test.py"], + data = [ + "data/data.txt", + "@our_other_module//other_module/pkg:data/data.txt", + ], + env = { + "DATA_RLOCATIONPATH": "$(rlocationpath data/data.txt)", + "OTHER_MODULE_DATA_RLOCATIONPATH": "$(rlocationpath @our_other_module//other_module/pkg:data/data.txt)", + }, + deps = [ + "@our_other_module//other_module/pkg:lib", + "@rules_python//python/runfiles", + ], +) |