Merge "Fix test app and helper installation dirs."
This commit is contained in:
@@ -448,7 +448,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
} else if a.Privileged() {
|
||||
a.installDir = android.PathForModuleInstall(ctx, "priv-app", a.installApkName)
|
||||
} else if ctx.InstallInTestcases() {
|
||||
a.installDir = android.PathForModuleInstall(ctx, a.installApkName)
|
||||
a.installDir = android.PathForModuleInstall(ctx, a.installApkName, ctx.DeviceConfig().DeviceArch())
|
||||
} else {
|
||||
a.installDir = android.PathForModuleInstall(ctx, "app", a.installApkName)
|
||||
}
|
||||
@@ -697,6 +697,10 @@ type AndroidTestHelperApp struct {
|
||||
appTestHelperAppProperties appTestHelperAppProperties
|
||||
}
|
||||
|
||||
func (a *AndroidTestHelperApp) InstallInTestcases() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// android_test_helper_app compiles sources and Android resources into an Android application package `.apk` file that
|
||||
// will be used by tests, but does not produce an `AndroidTest.xml` file so the module will not be run directly as a
|
||||
// test.
|
||||
|
@@ -1159,7 +1159,7 @@ func TestOverrideAndroidTest(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
variantName: "android_common",
|
||||
apkPath: "/target/product/test_device/testcases/foo_test/foo_test.apk",
|
||||
apkPath: "/target/product/test_device/testcases/foo_test/arm64/foo_test.apk",
|
||||
overrides: nil,
|
||||
targetVariant: "android_common",
|
||||
packageFlag: "",
|
||||
@@ -1167,7 +1167,7 @@ func TestOverrideAndroidTest(t *testing.T) {
|
||||
},
|
||||
{
|
||||
variantName: "android_common_bar_test",
|
||||
apkPath: "/target/product/test_device/testcases/bar_test/bar_test.apk",
|
||||
apkPath: "/target/product/test_device/testcases/bar_test/arm64/bar_test.apk",
|
||||
overrides: []string{"foo_test"},
|
||||
targetVariant: "android_common_bar",
|
||||
packageFlag: "com.android.bar.test",
|
||||
|
Reference in New Issue
Block a user