Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 326a9417 authored by Jaewoong Jung's avatar Jaewoong Jung
Browse files

Fix test app and helper installation dirs.

Fixes: 143902486
Test: app_test.go + m CtsIsolatedSplitApp
Change-Id: I3e1b8bf14cb9f440a6d8b0d2ac65525f00470cb8
parent 5d790c3d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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.
+2 −2
Original line number Diff line number Diff line
@@ -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",