Merge "Remove uses of buildDir from java/app_import_test.go"
This commit is contained in:
@@ -252,14 +252,15 @@ func TestAndroidAppImport_DpiVariants(t *testing.T) {
|
|||||||
|
|
||||||
jniRuleRe := regexp.MustCompile("^if \\(zipinfo (\\S+)")
|
jniRuleRe := regexp.MustCompile("^if \\(zipinfo (\\S+)")
|
||||||
for _, test := range testCases {
|
for _, test := range testCases {
|
||||||
config := testAppConfig(nil, bp, nil)
|
result := android.GroupFixturePreparers(
|
||||||
config.TestProductVariables.AAPTPreferredConfig = test.aaptPreferredConfig
|
PrepareForTestWithJavaDefaultModules,
|
||||||
config.TestProductVariables.AAPTPrebuiltDPI = test.aaptPrebuiltDPI
|
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
|
||||||
ctx := testContext(config)
|
variables.AAPTPreferredConfig = test.aaptPreferredConfig
|
||||||
|
variables.AAPTPrebuiltDPI = test.aaptPrebuiltDPI
|
||||||
|
}),
|
||||||
|
).RunTestWithBp(t, bp)
|
||||||
|
|
||||||
run(t, ctx, config)
|
variant := result.ModuleForTests("foo", "android_common")
|
||||||
|
|
||||||
variant := ctx.ModuleForTests("foo", "android_common")
|
|
||||||
jniRuleCommand := variant.Output("jnis-uncompressed/foo.apk").RuleParams.Command
|
jniRuleCommand := variant.Output("jnis-uncompressed/foo.apk").RuleParams.Command
|
||||||
matches := jniRuleRe.FindStringSubmatch(jniRuleCommand)
|
matches := jniRuleRe.FindStringSubmatch(jniRuleCommand)
|
||||||
if len(matches) != 2 {
|
if len(matches) != 2 {
|
||||||
@@ -456,12 +457,9 @@ func TestAndroidAppImport_frameworkRes(t *testing.T) {
|
|||||||
t.Errorf("prebuilt framework-res is not preprocessed")
|
t.Errorf("prebuilt framework-res is not preprocessed")
|
||||||
}
|
}
|
||||||
|
|
||||||
expectedInstallPath := buildDir + "/target/product/test_device/system/framework/framework-res.apk"
|
expectedInstallPath := "out/soong/target/product/test_device/system/framework/framework-res.apk"
|
||||||
|
|
||||||
if a.dexpreopter.installPath.String() != expectedInstallPath {
|
android.AssertPathRelativeToTopEquals(t, "prebuilt framework-res install location", expectedInstallPath, a.dexpreopter.installPath)
|
||||||
t.Errorf("prebuilt framework-res installed to incorrect location, actual: %s, expected: %s", a.dexpreopter.installPath, expectedInstallPath)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
|
entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user