Remove special handling of prebuilt_framework-res
prebuilt_framework-res doesn't appear to exist anymore. Bug: 185811447 Test: m nothing Change-Id: Ib1aa929fbe007f87d03bdc85e4d54c6fae4e510b
This commit is contained in:
@@ -505,67 +505,6 @@ func TestAndroidAppImport_overridesDisabledAndroidApp(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAndroidAppImport_frameworkRes(t *testing.T) {
|
||||
ctx, _ := testJava(t, `
|
||||
android_app_import {
|
||||
name: "framework-res",
|
||||
certificate: "platform",
|
||||
apk: "package-res.apk",
|
||||
prefer: true,
|
||||
export_package_resources: true,
|
||||
// Disable dexpreopt and verify_uses_libraries check as the app
|
||||
// contains no Java code to be dexpreopted.
|
||||
enforce_uses_libs: false,
|
||||
dex_preopt: {
|
||||
enabled: false,
|
||||
},
|
||||
}
|
||||
`)
|
||||
|
||||
mod := ctx.ModuleForTests("prebuilt_framework-res", "android_common").Module()
|
||||
a := mod.(*AndroidAppImport)
|
||||
|
||||
if !a.preprocessed {
|
||||
t.Errorf("prebuilt framework-res is not preprocessed")
|
||||
}
|
||||
|
||||
expectedInstallPath := "out/soong/target/product/test_device/system/framework/framework-res.apk"
|
||||
|
||||
android.AssertPathRelativeToTopEquals(t, "prebuilt framework-res install location", expectedInstallPath, a.dexpreopter.installPath)
|
||||
|
||||
entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0]
|
||||
|
||||
expectedPath := "."
|
||||
// From apk property above, in the root of the source tree.
|
||||
expectedPrebuiltModuleFile := "package-res.apk"
|
||||
// Verify that the apk is preprocessed: The export package is the same
|
||||
// as the prebuilt.
|
||||
expectedSoongResourceExportPackage := expectedPrebuiltModuleFile
|
||||
|
||||
actualPath := entries.EntryMap["LOCAL_PATH"]
|
||||
actualPrebuiltModuleFile := entries.EntryMap["LOCAL_PREBUILT_MODULE_FILE"]
|
||||
actualSoongResourceExportPackage := entries.EntryMap["LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE"]
|
||||
|
||||
if len(actualPath) != 1 {
|
||||
t.Errorf("LOCAL_PATH incorrect len %d", len(actualPath))
|
||||
} else if actualPath[0] != expectedPath {
|
||||
t.Errorf("LOCAL_PATH mismatch, actual: %s, expected: %s", actualPath[0], expectedPath)
|
||||
}
|
||||
|
||||
if len(actualPrebuiltModuleFile) != 1 {
|
||||
t.Errorf("LOCAL_PREBUILT_MODULE_FILE incorrect len %d", len(actualPrebuiltModuleFile))
|
||||
} else if actualPrebuiltModuleFile[0] != expectedPrebuiltModuleFile {
|
||||
t.Errorf("LOCAL_PREBUILT_MODULE_FILE mismatch, actual: %s, expected: %s", actualPrebuiltModuleFile[0], expectedPrebuiltModuleFile)
|
||||
}
|
||||
|
||||
if len(actualSoongResourceExportPackage) != 1 {
|
||||
t.Errorf("LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE incorrect len %d", len(actualSoongResourceExportPackage))
|
||||
} else if actualSoongResourceExportPackage[0] != expectedSoongResourceExportPackage {
|
||||
t.Errorf("LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE mismatch, actual: %s, expected: %s", actualSoongResourceExportPackage[0], expectedSoongResourceExportPackage)
|
||||
}
|
||||
android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "android_app_import", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0])
|
||||
}
|
||||
|
||||
func TestAndroidAppImport_relativeInstallPath(t *testing.T) {
|
||||
bp := `
|
||||
android_app_import {
|
||||
@@ -581,13 +520,6 @@ func TestAndroidAppImport_relativeInstallPath(t *testing.T) {
|
||||
relative_install_path: "my/path",
|
||||
}
|
||||
|
||||
android_app_import {
|
||||
name: "framework-res",
|
||||
apk: "prebuilts/apk/app.apk",
|
||||
presigned: true,
|
||||
prefer: true,
|
||||
}
|
||||
|
||||
android_app_import {
|
||||
name: "privileged_relative_install_path",
|
||||
apk: "prebuilts/apk/app.apk",
|
||||
@@ -611,11 +543,6 @@ func TestAndroidAppImport_relativeInstallPath(t *testing.T) {
|
||||
expectedInstallPath: "out/soong/target/product/test_device/system/app/my/path/relative_install_path/relative_install_path.apk",
|
||||
errorMessage: "Install path is not correct for app when relative_install_path is present",
|
||||
},
|
||||
{
|
||||
name: "prebuilt_framework-res",
|
||||
expectedInstallPath: "out/soong/target/product/test_device/system/framework/framework-res.apk",
|
||||
errorMessage: "Install path is not correct for framework-res",
|
||||
},
|
||||
{
|
||||
name: "privileged_relative_install_path",
|
||||
expectedInstallPath: "out/soong/target/product/test_device/system/priv-app/my/path/privileged_relative_install_path/privileged_relative_install_path.apk",
|
||||
|
Reference in New Issue
Block a user