summaryrefslogtreecommitdiff
path: root/android/bazel_paths_test.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-06-21 01:50:33 +0000
committer Spandan Das <spandandas@google.com> 2023-07-13 00:22:26 +0000
commit0a8a27500ef49c16a0f53963ce27eb90efe1b11d (patch)
treec00b947eab8bdd12abe297289212d23b1ce3d096 /android/bazel_paths_test.go
parent69afa98fbd19500786db96554bc6347dab07e557 (diff)
Respect package boundaries in bp2build conversion of go modules
bp2build's codegen context does not implement BazelPathConversionContext. To reuse the utility function transformPackagePaths, update its signature (Also make deps of go_library unique to make the conversion resilient) Test: go test ./bp2build Change-Id: I126b1057d2b26bc6c7d3be2780f1b62d28323cf0
Diffstat (limited to 'android/bazel_paths_test.go')
-rw-r--r--android/bazel_paths_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/bazel_paths_test.go b/android/bazel_paths_test.go
index 450bf7674..60c0a1478 100644
--- a/android/bazel_paths_test.go
+++ b/android/bazel_paths_test.go
@@ -175,7 +175,7 @@ func TestTransformSubpackagePath(t *testing.T) {
"./z/b.c": "z/b.c",
}
for in, out := range pairs {
- actual := transformSubpackagePath(ctx, bazel.Label{Label: in}).Label
+ actual := transformSubpackagePath(ctx.Config(), ctx.ModuleDir(), bazel.Label{Label: in}).Label
if actual != out {
t.Errorf("expected:\n%v\nactual:\n%v", out, actual)
}