summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-10-09 10:54:15 -0700
committerColin Cross <ccross@android.com>2020-10-09 19:27:34 -0700
commitc179ea68129972f6c5789c5fc8344d06caebcc8b (patch)
tree134ec8d69c73a0bff98ba11b8999bb3221a59152 /java/java_test.go
parentde78d138a152f6aac7e45968ffbe30c28da16fb0 (diff)
Make java_binary common variant a dependency
ctx.PrimaryModule() is wrong in the case of a java_binary that supports both host and device, use an explicit dependency instead. Once the dependency exists there is no need to manually request the jar be installed, it will automatically be installed by the host installation rules for dependencies. Test: TestBinary Change-Id: Iddeea2d08bc574c79d42139020558cd70d718ca1
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/java/java_test.go b/java/java_test.go
index a43e2a8c9..a727812b5 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -467,9 +467,8 @@ func TestBinary(t *testing.T) {
barWrapperDeps := barWrapper.Output("bar").Implicits.Strings()
// Test that the install binary wrapper depends on the installed jar file
- if len(barWrapperDeps) != 1 || barWrapperDeps[0] != barJar {
- t.Errorf("expected binary wrapper implicits [%q], got %v",
- barJar, barWrapperDeps)
+ if g, w := barWrapperDeps, barJar; !android.InList(w, g) {
+ t.Errorf("expected binary wrapper implicits to contain %q, got %q", w, g)
}
}