diff options
author | 2019-10-07 17:33:00 +0000 | |
---|---|---|
committer | 2019-10-07 17:33:00 +0000 | |
commit | 63c7727dec5cde91193db7f146395b54192ae1cc (patch) | |
tree | bd592cad237253aae36bf849082dea413288b39e /java/sdk_test.go | |
parent | 3776d9546a60937c06dcab380aadd38b787b18e7 (diff) | |
parent | c080617c8b0910fda257151aa8141676a1d6a328 (diff) |
Merge changes from topics "soong_java_aidl", "soong_java_proto"
* changes:
Shard aidl compiles into srcjars
Shard java proto files into groups of 100
Support deps files with no output
Diffstat (limited to 'java/sdk_test.go')
-rw-r--r-- | java/sdk_test.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/java/sdk_test.go b/java/sdk_test.go index 88e21d73d..5001b477b 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -250,7 +250,10 @@ func TestClasspath(t *testing.T) { } checkClasspath := func(t *testing.T, ctx *android.TestContext) { - javac := ctx.ModuleForTests("foo", variant).Rule("javac") + foo := ctx.ModuleForTests("foo", variant) + javac := foo.Rule("javac") + + aidl := foo.MaybeRule("aidl") got := javac.Args["bootClasspath"] if got != bc { @@ -263,6 +266,9 @@ func TestClasspath(t *testing.T) { } var deps []string + if aidl.Rule != nil { + deps = append(deps, aidl.Output.String()) + } if len(bootclasspath) > 0 && bootclasspath[0] != `""` { deps = append(deps, bootclasspath...) } @@ -290,12 +296,8 @@ func TestClasspath(t *testing.T) { if testcase.host != android.Host { aidl := ctx.ModuleForTests("foo", variant).Rule("aidl") - aidlFlags := aidl.Args["aidlFlags"] - // Trim trailing "-I." to avoid having to specify it in every test - aidlFlags = strings.TrimSpace(strings.TrimSuffix(aidlFlags, "-I.")) - - if g, w := aidlFlags, testcase.aidl; g != w { - t.Errorf("want aidl flags %q, got %q", w, g) + if g, w := aidl.RuleParams.Command, testcase.aidl+" -I."; !strings.Contains(g, w) { + t.Errorf("want aidl command to contain %q, got %q", w, g) } } }) |