Merge "Fix test app and helper installation dirs."
am: a21e9ddcf8
Change-Id: I9c318eb6cd6e67e9ef6788e7dce18bb4406bcf64
This commit is contained in:
commit
41afdba365
2 changed files with 7 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue