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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user