Merge "Remove uses of buildDir in java/androidmk_test.go" am: 6f59e6a568
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649797 Change-Id: Ic44e14b3ef04f7041dae0d67c5988a0881814efb
This commit is contained in:
commit
1a5e03e155
|
@ -171,7 +171,7 @@ func TestJavaSdkLibrary_RequireXmlPermissionFile(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestImportSoongDexJar(t *testing.T) {
|
||||
ctx, _ := testJava(t, `
|
||||
result := PrepareForTestWithJavaDefaultModules.RunTestWithBp(t, `
|
||||
java_import {
|
||||
name: "my-java-import",
|
||||
jars: ["a.jar"],
|
||||
|
@ -180,14 +180,10 @@ func TestImportSoongDexJar(t *testing.T) {
|
|||
}
|
||||
`)
|
||||
|
||||
mod := ctx.ModuleForTests("my-java-import", "android_common").Module()
|
||||
entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
|
||||
expectedSoongDexJar := buildDir + "/.intermediates/my-java-import/android_common/dex/my-java-import.jar"
|
||||
mod := result.Module("my-java-import", "android_common")
|
||||
entries := android.AndroidMkEntriesForTest(t, result.TestContext, mod)[0]
|
||||
expectedSoongDexJar := "out/soong/.intermediates/my-java-import/android_common/dex/my-java-import.jar"
|
||||
actualSoongDexJar := entries.EntryMap["LOCAL_SOONG_DEX_JAR"]
|
||||
|
||||
if len(actualSoongDexJar) != 1 {
|
||||
t.Errorf("LOCAL_SOONG_DEX_JAR incorrect len %d", len(actualSoongDexJar))
|
||||
} else if actualSoongDexJar[0] != expectedSoongDexJar {
|
||||
t.Errorf("LOCAL_SOONG_DEX_JAR mismatch, actual: %s, expected: %s", actualSoongDexJar[0], expectedSoongDexJar)
|
||||
}
|
||||
android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_SOONG_DEX_JAR", result.Config, []string{expectedSoongDexJar}, actualSoongDexJar)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue