summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-03-19 17:25:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-03-19 17:25:14 +0000
commitd2db7953a083f4095705c698c0f14fe9a1ac927e (patch)
tree0eb52cce78c0fcfbfc8f66acfa86ca67788ec5f1 /java/java_test.go
parent00d54280d0069cdbdd7f1c41407a9a080e6b792a (diff)
parent1661aff8bea44396b3587e19c8c79fd574bf043d (diff)
Merge changes Iab4e09d9,Icf2f24dd,I15be5ef1,Ic0db9619
* changes: Run lint actions in sbox Support sbox-in-RBE Move android package on top of remotexec Support sandboxing inputs in RuleBuilder
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/java_test.go b/java/java_test.go
index ee6380ddd..99a96e121 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -25,12 +25,12 @@ import (
"strings"
"testing"
- "android/soong/genrule"
"github.com/google/blueprint/proptools"
"android/soong/android"
"android/soong/cc"
"android/soong/dexpreopt"
+ "android/soong/genrule"
"android/soong/python"
)
@@ -1301,9 +1301,9 @@ func TestJavaLint(t *testing.T) {
})
foo := ctx.ModuleForTests("foo", "android_common")
- rule := foo.Rule("lint")
- if !strings.Contains(rule.RuleParams.Command, "--baseline lint-baseline.xml") {
+ sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
+ if !strings.Contains(*sboxProto.Commands[0].Command, "--baseline lint-baseline.xml") {
t.Error("did not pass --baseline flag")
}
}
@@ -1323,9 +1323,9 @@ func TestJavaLintWithoutBaseline(t *testing.T) {
`, map[string][]byte{})
foo := ctx.ModuleForTests("foo", "android_common")
- rule := foo.Rule("lint")
- if strings.Contains(rule.RuleParams.Command, "--baseline") {
+ sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
+ if strings.Contains(*sboxProto.Commands[0].Command, "--baseline") {
t.Error("passed --baseline flag for non existent file")
}
}
@@ -1381,9 +1381,9 @@ func TestJavaLintUsesCorrectBpConfig(t *testing.T) {
})
foo := ctx.ModuleForTests("foo", "android_common")
- rule := foo.Rule("lint")
- if !strings.Contains(rule.RuleParams.Command, "--baseline mybaseline.xml") {
+ sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
+ if !strings.Contains(*sboxProto.Commands[0].Command, "--baseline mybaseline.xml") {
t.Error("did not use the correct file for baseline")
}
}