aboutsummaryrefslogtreecommitdiff
path: root/test_defs.bzl
diff options
context:
space:
mode:
authorlaurentlb <laurentlb@google.com>2018-03-21 10:14:38 -0700
committerRon Shapiro <shapiro.rd@gmail.com>2018-03-22 11:40:53 -0400
commit2f30bdc46eb94a68d80b171a68bfb2d599d7ab63 (patch)
treec0bfbca03101fb8b5fe736355bfe20be68515683 /test_defs.bzl
parent2aecb23d56037d32774d4d8fc3adc8489e1ffa81 (diff)
downloaddagger2-2f30bdc46eb94a68d80b171a68bfb2d599d7ab63.tar.gz
Replace PACKAGE_NAME with package_name() in bzl files.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189926134
Diffstat (limited to 'test_defs.bzl')
-rw-r--r--test_defs.bzl5
1 files changed, 3 insertions, 2 deletions
diff --git a/test_defs.bzl b/test_defs.bzl
index ee8cb2ade..2f96caf15 100644
--- a/test_defs.bzl
+++ b/test_defs.bzl
@@ -85,9 +85,10 @@ def _gen_tests(library_rule_type, test_rule_type, name, srcs, deps, test_only_de
for test_file in test_files:
test_name = test_file.replace(".java", "")
prefix_path = "src/test/java/"
- if PACKAGE_NAME.find("javatests/") != -1:
+ package_name = native.package_name()
+ if package_name.find("javatests/") != -1:
prefix_path = "javatests/"
- test_class = (PACKAGE_NAME + "/" + test_name).rpartition(prefix_path)[2].replace("/",".")
+ test_class = (package_name + "/" + test_name).rpartition(prefix_path)[2].replace("/",".")
test_rule_type(
name = test_name + suffix,
deps = test_deps,