Use empty string for core image variant
Use the empty string for the core image variant so that modules added to imageMutator do not change their build directory. Bug: 142286466 Test: m checkbuild Change-Id: Ida4534d9a4d6176236aaa480fed359ce27acfaa1 Merged-In: Ida4534d9a4d6176236aaa480fed359ce27acfaa1 (cherry picked from commit 72d685ee7f45e5393be44ae4159edf083ac918de)
This commit is contained in:
@@ -88,7 +88,7 @@ func TestPrebuiltEtcOutputPath(t *testing.T) {
|
||||
}
|
||||
`)
|
||||
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
if p.outputFilePath.Base() != "foo.installed.conf" {
|
||||
t.Errorf("expected foo.installed.conf, got %q", p.outputFilePath.Base())
|
||||
}
|
||||
@@ -107,12 +107,12 @@ func TestPrebuiltEtcGlob(t *testing.T) {
|
||||
}
|
||||
`)
|
||||
|
||||
p := ctx.ModuleForTests("my_foo", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
p := ctx.ModuleForTests("my_foo", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
if p.outputFilePath.Base() != "my_foo" {
|
||||
t.Errorf("expected my_foo, got %q", p.outputFilePath.Base())
|
||||
}
|
||||
|
||||
p = ctx.ModuleForTests("my_bar", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
p = ctx.ModuleForTests("my_bar", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
if p.outputFilePath.Base() != "bar.conf" {
|
||||
t.Errorf("expected bar.conf, got %q", p.outputFilePath.Base())
|
||||
}
|
||||
@@ -141,7 +141,7 @@ func TestPrebuiltEtcAndroidMk(t *testing.T) {
|
||||
"LOCAL_TARGET_REQUIRED_MODULES": {"targetModA"},
|
||||
}
|
||||
|
||||
mod := ctx.ModuleForTests("foo", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
mod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
entries := AndroidMkEntriesForTest(t, config, "", mod)[0]
|
||||
for k, expectedValue := range expected {
|
||||
if value, ok := entries.EntryMap[k]; ok {
|
||||
@@ -178,7 +178,7 @@ func TestPrebuiltUserShareInstallDirPath(t *testing.T) {
|
||||
}
|
||||
`)
|
||||
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
expected := buildDir + "/target/product/test_device/system/usr/share/bar"
|
||||
if p.installDirPath.String() != expected {
|
||||
t.Errorf("expected %q, got %q", expected, p.installDirPath.String())
|
||||
@@ -210,7 +210,7 @@ func TestPrebuiltFontInstallDirPath(t *testing.T) {
|
||||
}
|
||||
`)
|
||||
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
expected := buildDir + "/target/product/test_device/system/fonts"
|
||||
if p.installDirPath.String() != expected {
|
||||
t.Errorf("expected %q, got %q", expected, p.installDirPath.String())
|
||||
@@ -245,7 +245,7 @@ func TestPrebuiltFirmwareDirPath(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.description, func(t *testing.T) {
|
||||
ctx, _ := testPrebuiltEtc(t, tt.config)
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a_core").Module().(*PrebuiltEtc)
|
||||
p := ctx.ModuleForTests("foo.conf", "android_arm64_armv8-a").Module().(*PrebuiltEtc)
|
||||
if p.installDirPath.String() != tt.expectedPath {
|
||||
t.Errorf("expected %q, got %q", tt.expectedPath, p.installDirPath)
|
||||
}
|
||||
|
Reference in New Issue
Block a user