diff options
| author | Colin Cross <ccross@android.com> | 2017-10-02 13:55:26 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2017-10-02 23:18:19 -0700 |
| commit | d5934c8bb7c17e324a9db7b28dcac14a8b727474 (patch) | |
| tree | bf6abeb7ba6438a739aadd5e6b81acbb3dd8c8f9 /java/java_test.go | |
| parent | a60ead85fc2819f9bfa52aae7393cdca56137991 (diff) | |
Fix arch specific properties for java modules
Arch specific properties were not being applied to modules
with OS set to Common.
Test: java_test.go
Change-Id: I8f1b49ca51b0cf96f78006dfcd121672e581d9c5
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go index ffa3e2b17..2b92f49e7 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -139,7 +139,7 @@ func TestSimple(t *testing.T) { name: "baz", srcs: ["c.java"], } - `) + `) javac := ctx.ModuleForTests("foo", "android_common").Rule("javac") combineJar := ctx.ModuleForTests("foo", "android_common").Rule("combineJar") @@ -164,6 +164,25 @@ func TestSimple(t *testing.T) { } } +func TestArchSpecific(t *testing.T) { + ctx := testJava(t, ` + java_library { + name: "foo", + srcs: ["a.java"], + target: { + android: { + srcs: ["b.java"], + }, + }, + } + `) + + javac := ctx.ModuleForTests("foo", "android_common").Rule("javac") + if len(javac.Inputs) != 2 || javac.Inputs[0].String() != "a.java" || javac.Inputs[1].String() != "b.java" { + t.Errorf(`foo inputs %v != ["a.java", "b.java"]`, javac.Inputs) + } +} + var classpathTestcases = []struct { name string host android.OsClass |
