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

Commit a21e9ddc authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix test app and helper installation dirs."

parents 0aa51a01 326a9417
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",