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
This commit is contained in:
Colin Cross
2021-03-19 17:25:14 +00:00
committed by Gerrit Code Review
18 changed files with 367 additions and 207 deletions

View File

@@ -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")
}
}