diff --git a/java/app.go b/java/app.go
index 5f43326..e01a2ba 100644
--- a/java/app.go
+++ b/java/app.go
@@ -1442,9 +1442,8 @@
 	a.data = append(a.data, android.PathsForModuleSrc(ctx, a.testProperties.Device_common_data)...)
 	a.data = append(a.data, android.PathsForModuleSrc(ctx, a.testProperties.Device_first_data)...)
 	a.data = append(a.data, android.PathsForModuleSrc(ctx, a.testProperties.Device_first_prefer32_data)...)
-
 	android.SetProvider(ctx, tradefed.BaseTestProviderKey, tradefed.BaseTestProviderData{
-		TestcaseRelDataFiles:    testcaseRel(a.data),
+		InstalledFiles:          a.data,
 		OutputFile:              a.OutputFile(),
 		TestConfig:              a.testConfig,
 		HostRequiredModuleNames: a.HostRequiredModuleNames(),
@@ -1452,8 +1451,6 @@
 		IsHost:                  false,
 		LocalCertificate:        a.certificate.AndroidMkString(),
 		IsUnitTest:              Bool(a.testProperties.Test_options.Unit_test),
-		MkInclude:               "$(BUILD_SYSTEM)/soong_app_prebuilt.mk",
-		MkAppClass:              "APPS",
 	})
 	android.SetProvider(ctx, android.TestOnlyProviderKey, android.TestModuleInformation{
 		TestOnly:       true,
@@ -1462,14 +1459,6 @@
 
 }
 
-func testcaseRel(paths android.Paths) []string {
-	relPaths := []string{}
-	for _, p := range paths {
-		relPaths = append(relPaths, p.Rel())
-	}
-	return relPaths
-}
-
 func (a *AndroidTest) FixTestConfig(ctx android.ModuleContext, testConfig android.Path) android.Path {
 	if testConfig == nil {
 		return nil
diff --git a/java/java.go b/java/java.go
index fff902f..53b3481 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1559,16 +1559,14 @@
 
 	j.Test.generateAndroidBuildActionsWithConfig(ctx, configs)
 	android.SetProvider(ctx, tradefed.BaseTestProviderKey, tradefed.BaseTestProviderData{
-		TestcaseRelDataFiles: testcaseRel(j.data),
-		OutputFile:           j.outputFile,
-		TestConfig:           j.testConfig,
-		RequiredModuleNames:  j.RequiredModuleNames(ctx),
-		TestSuites:           j.testProperties.Test_suites,
-		IsHost:               true,
-		LocalSdkVersion:      j.sdkVersion.String(),
-		IsUnitTest:           Bool(j.testProperties.Test_options.Unit_test),
-		MkInclude:            "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
-		MkAppClass:           "JAVA_LIBRARIES",
+		InstalledFiles:      j.data,
+		OutputFile:          j.outputFile,
+		TestConfig:          j.testConfig,
+		RequiredModuleNames: j.RequiredModuleNames(ctx),
+		TestSuites:          j.testProperties.Test_suites,
+		IsHost:              true,
+		LocalSdkVersion:     j.sdkVersion.String(),
+		IsUnitTest:          Bool(j.testProperties.Test_options.Unit_test),
 	})
 }
 
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index 320e97f..853f3d3 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -15,7 +15,6 @@
 package sh
 
 import (
-	"fmt"
 	"path/filepath"
 	"strings"
 
@@ -165,9 +164,6 @@
 
 	// Test options.
 	Test_options android.CommonTestOptions
-
-	// a list of extra test configuration files that should be installed with the module.
-	Extra_test_configs []string `android:"path,arch_variant"`
 }
 
 type ShBinary struct {
@@ -190,9 +186,8 @@
 
 	installDir android.InstallPath
 
-	data             []android.DataPath
-	testConfig       android.Path
-	extraTestConfigs android.Paths
+	data       []android.DataPath
+	testConfig android.Path
 
 	dataModules map[string]android.Path
 }
@@ -476,7 +471,6 @@
 		HostTemplate:           "${ShellTestConfigTemplate}",
 	})
 
-	s.extraTestConfigs = android.PathsForModuleSrc(ctx, s.testProperties.Extra_test_configs)
 	s.dataModules = make(map[string]android.Path)
 	ctx.VisitDirectDeps(func(dep android.Module) {
 		depTag := ctx.OtherModuleDependencyTag(dep)
@@ -516,27 +510,6 @@
 
 	installedData := ctx.InstallTestData(s.installDir, s.data)
 	s.installedFile = ctx.InstallExecutable(s.installDir, s.outputFilePath.Base(), s.outputFilePath, installedData...)
-
-	mkEntries := s.AndroidMkEntries()[0]
-	android.SetProvider(ctx, tradefed.BaseTestProviderKey, tradefed.BaseTestProviderData{
-		TestcaseRelDataFiles: addArch(ctx.Arch().ArchType.String(), installedData.Paths()),
-		OutputFile:           s.outputFilePath,
-		TestConfig:           s.testConfig,
-		TestSuites:           s.testProperties.Test_suites,
-		IsHost:               false,
-		IsUnitTest:           Bool(s.testProperties.Test_options.Unit_test),
-		MkInclude:            mkEntries.Include,
-		MkAppClass:           mkEntries.Class,
-		InstallDir:           s.installDir,
-	})
-}
-
-func addArch(archType string, paths android.Paths) []string {
-	archRelPaths := []string{}
-	for _, p := range paths {
-		archRelPaths = append(archRelPaths, fmt.Sprintf("%s/%s", archType, p.Rel()))
-	}
-	return archRelPaths
 }
 
 func (s *ShTest) InstallInData() bool {
@@ -560,9 +533,6 @@
 					entries.AddStrings("LOCAL_TEST_DATA_BINS", s.testProperties.Data_bins...)
 				}
 				entries.SetBoolIfTrue("LOCAL_COMPATIBILITY_PER_TESTCASE_DIRECTORY", Bool(s.testProperties.Per_testcase_directory))
-				if len(s.extraTestConfigs) > 0 {
-					entries.AddStrings("LOCAL_EXTRA_FULL_TEST_CONFIGS", s.extraTestConfigs.Strings()...)
-				}
 
 				s.testProperties.Test_options.SetAndroidMkEntries(entries)
 			},
diff --git a/sh/sh_binary_test.go b/sh/sh_binary_test.go
index 28f997d..5a50439 100644
--- a/sh/sh_binary_test.go
+++ b/sh/sh_binary_test.go
@@ -176,22 +176,6 @@
 	android.AssertBoolEquals(t, "LOCAL_IS_UNIT_TEST", true, actualData)
 }
 
-func TestShTestExtraTestConfig(t *testing.T) {
-	result, _ := testShBinary(t, `
-		sh_test {
-			name: "foo",
-			src: "test.sh",
-			filename: "test.sh",
-                        extra_test_configs: ["config1.xml", "config2.xml"],
-		}
-	`)
-
-	mod := result.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest)
-	entries := android.AndroidMkEntriesForTest(t, result, mod)[0]
-	actualData := entries.EntryMap["LOCAL_EXTRA_FULL_TEST_CONFIGS"]
-	android.AssertStringPathsRelativeToTopEquals(t, "extra_configs", result.Config(), []string{"config1.xml", "config2.xml"}, actualData)
-}
-
 func TestShTestHost_dataDeviceModules(t *testing.T) {
 	ctx, config := testShBinary(t, `
 		sh_test_host {
diff --git a/tradefed/providers.go b/tradefed/providers.go
index 0ae841d..0abac12 100644
--- a/tradefed/providers.go
+++ b/tradefed/providers.go
@@ -9,8 +9,8 @@
 // Data that test_module_config[_host] modules types will need from
 // their dependencies to write out build rules and AndroidMkEntries.
 type BaseTestProviderData struct {
-	// data files and apps installed for tests, relative to testcases dir.
-	TestcaseRelDataFiles []string
+	// data files and apps for android_test
+	InstalledFiles android.Paths
 	// apk for android_test
 	OutputFile android.Path
 	// Either handwritten or generated TF xml.
@@ -28,12 +28,6 @@
 	LocalCertificate string
 	// Indicates if the base module was a unit test.
 	IsUnitTest bool
-	// The .mk file is used AndroidMkEntries for base (soong_java_prebuilt, etc.)
-	MkInclude string
-	// The AppClass to use for the AndroidMkEntries for the base.
-	MkAppClass string
-	// value for LOCAL_MODULE_PATH.  The directory where the module is installed.
-	InstallDir android.InstallPath
 }
 
 var BaseTestProviderKey = blueprint.NewProvider[BaseTestProviderData]()
diff --git a/tradefed_modules/Android.bp b/tradefed_modules/Android.bp
index 37bae39..9969ae2 100644
--- a/tradefed_modules/Android.bp
+++ b/tradefed_modules/Android.bp
@@ -9,7 +9,6 @@
         "blueprint",
         "soong-android",
         "soong-java",
-        "soong-sh",
         "soong-tradefed",
     ],
     srcs: [
diff --git a/tradefed_modules/test_module_config.go b/tradefed_modules/test_module_config.go
index 4abaaa6..7a04c19 100644
--- a/tradefed_modules/test_module_config.go
+++ b/tradefed_modules/test_module_config.go
@@ -196,7 +196,7 @@
 	module := &testModuleConfigModule{}
 
 	module.AddProperties(&module.tradefedProperties)
-	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
+	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
 	android.InitDefaultableModule(module)
 
 	return module
@@ -216,28 +216,13 @@
 // Implements android.AndroidMkEntriesProvider
 var _ android.AndroidMkEntriesProvider = (*testModuleConfigModule)(nil)
 
-func (m *testModuleConfigModule) nativeExtraEntries(entries *android.AndroidMkEntries) {
-	// TODO(ron) provider for suffix and STEM?
-	entries.SetString("LOCAL_MODULE_SUFFIX", "")
-	// Should the stem and path use the base name or our module name?
-	entries.SetString("LOCAL_MODULE_STEM", m.provider.OutputFile.Rel())
-	entries.SetPath("LOCAL_MODULE_PATH", m.provider.InstallDir)
-}
-
-func (m *testModuleConfigModule) javaExtraEntries(entries *android.AndroidMkEntries) {
-	// The app_prebuilt_internal.mk files try create a copy of the OutputFile as an .apk.
-	// Normally, this copies the "package.apk" from the intermediate directory here.
-	// To prevent the copy of the large apk and to prevent confusion with the real .apk we
-	// link to, we set the STEM here to a bogus name and we set OutputFile to a small file (our manifest).
-	// We do this so we don't have to add more conditionals to base_rules.mk
-	// soong_java_prebult has the same issue for .jars so use this in both module types.
-	entries.SetString("LOCAL_MODULE_STEM", fmt.Sprintf("UNUSED-%s", *m.Base))
-	entries.SetString("LOCAL_MODULE_TAGS", "tests")
-}
-
 func (m *testModuleConfigModule) AndroidMkEntries() []android.AndroidMkEntries {
-	appClass := m.provider.MkAppClass
-	include := m.provider.MkInclude
+	appClass := "APPS"
+	include := "$(BUILD_SYSTEM)/soong_app_prebuilt.mk"
+	if m.isHost {
+		appClass = "JAVA_LIBRARIES"
+		include = "$(BUILD_SYSTEM)/soong_java_prebuilt.mk"
+	}
 	return []android.AndroidMkEntries{{
 		Class:      appClass,
 		OutputFile: android.OptionalPathForPath(m.manifest),
@@ -246,6 +231,7 @@
 		ExtraEntries: []android.AndroidMkExtraEntriesFunc{
 			func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
 				entries.SetPath("LOCAL_FULL_TEST_CONFIG", m.testConfig)
+				entries.SetString("LOCAL_MODULE_TAGS", "tests")
 				entries.SetString("LOCAL_TEST_MODULE_CONFIG_BASE", *m.Base)
 				if m.provider.LocalSdkVersion != "" {
 					entries.SetString("LOCAL_SDK_VERSION", m.provider.LocalSdkVersion)
@@ -258,11 +244,13 @@
 				entries.AddCompatibilityTestSuites(m.tradefedProperties.Test_suites...)
 				entries.AddStrings("LOCAL_HOST_REQUIRED_MODULES", m.provider.HostRequiredModuleNames...)
 
-				if m.provider.MkAppClass == "NATIVE_TESTS" {
-					m.nativeExtraEntries(entries)
-				} else {
-					m.javaExtraEntries(entries)
-				}
+				// The app_prebuilt_internal.mk files try create a copy of the OutputFile as an .apk.
+				// Normally, this copies the "package.apk" from the intermediate directory here.
+				// To prevent the copy of the large apk and to prevent confusion with the real .apk we
+				// link to, we set the STEM here to a bogus name and we set OutputFile to a small file (our manifest).
+				// We do this so we don't have to add more conditionals to base_rules.mk
+				// soong_java_prebult has the same issue for .jars so use this in both module types.
+				entries.SetString("LOCAL_MODULE_STEM", fmt.Sprintf("UNUSED-%s", *m.Base))
 
 				// In normal java/app modules, the module writes LOCAL_COMPATIBILITY_SUPPORT_FILES
 				// and then base_rules.mk ends up copying each of those dependencies from .intermediates to the install directory.
@@ -369,19 +357,16 @@
 	// FrameworksServicesTests
 	// └── x86_64
 	//    └── FrameworksServicesTests.apk
-	if m.provider.MkAppClass != "NATIVE_TESTS" {
-		symlinkName := fmt.Sprintf("%s/%s", ctx.DeviceConfig().DeviceArch(), baseApk.Base())
-		// Only android_test, not java_host_test puts the output in the DeviceArch dir.
-		if m.provider.IsHost || ctx.DeviceConfig().DeviceArch() == "" {
-			// testcases/CtsDevicePolicyManagerTestCases
-			// ├── CtsDevicePolicyManagerTestCases.jar
-			symlinkName = baseApk.Base()
-		}
-
-		target := installedBaseRelativeToHere(symlinkName, *m.tradefedProperties.Base)
-		installedApk := ctx.InstallAbsoluteSymlink(installDir, symlinkName, target)
-		m.supportFiles = append(m.supportFiles, installedApk)
+	symlinkName := fmt.Sprintf("%s/%s", ctx.DeviceConfig().DeviceArch(), baseApk.Base())
+	// Only android_test, not java_host_test puts the output in the DeviceArch dir.
+	if m.provider.IsHost || ctx.DeviceConfig().DeviceArch() == "" {
+		// testcases/CtsDevicePolicyManagerTestCases
+		// ├── CtsDevicePolicyManagerTestCases.jar
+		symlinkName = baseApk.Base()
 	}
+	target := installedBaseRelativeToHere(symlinkName, *m.tradefedProperties.Base)
+	installedApk := ctx.InstallAbsoluteSymlink(installDir, symlinkName, target)
+	m.supportFiles = append(m.supportFiles, installedApk)
 
 	// 3) Symlink for all data deps
 	// And like this for data files and required modules
@@ -389,7 +374,8 @@
 	// ├── data
 	// │   └── broken_shortcut.xml
 	// ├── JobTestApp.apk
-	for _, symlinkName := range m.provider.TestcaseRelDataFiles {
+	for _, f := range m.provider.InstalledFiles {
+		symlinkName := f.Rel()
 		target := installedBaseRelativeToHere(symlinkName, *m.tradefedProperties.Base)
 		installedPath := ctx.InstallAbsoluteSymlink(installDir, symlinkName, target)
 		m.supportFiles = append(m.supportFiles, installedPath)
diff --git a/tradefed_modules/test_module_config_test.go b/tradefed_modules/test_module_config_test.go
index efd4a04..cf6c7d1 100644
--- a/tradefed_modules/test_module_config_test.go
+++ b/tradefed_modules/test_module_config_test.go
@@ -16,7 +16,6 @@
 import (
 	"android/soong/android"
 	"android/soong/java"
-	"android/soong/sh"
 	"fmt"
 	"strconv"
 	"strings"
@@ -55,8 +54,6 @@
 
 `
 
-const variant = "android_arm64_armv8-a"
-
 // Ensure we create files needed and set the AndroidMkEntries needed
 func TestModuleConfigAndroidTest(t *testing.T) {
 
@@ -65,7 +62,7 @@
 		android.FixtureRegisterWithContext(RegisterTestModuleConfigBuildComponents),
 	).RunTestWithBp(t, bp)
 
-	derived := ctx.ModuleForTests("derived_test", variant)
+	derived := ctx.ModuleForTests("derived_test", "android_common")
 	// Assert there are rules to create these files.
 	derived.Output("test_module_config.manifest")
 	derived.Output("test_config_fixer/derived_test.config")
@@ -91,7 +88,7 @@
 	// And some new derived entries are there.
 	android.AssertArrayString(t, "", entries.EntryMap["LOCAL_MODULE_TAGS"], []string{"tests"})
 
-	android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0], fmt.Sprintf("derived_test/%s/test_config_fixer/derived_test.config", variant))
+	android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0], "derived_test/android_common/test_config_fixer/derived_test.config")
 
 	// Check the footer lines.  Our support files should depend on base's support files.
 	convertedActual := make([]string, 5)
@@ -108,80 +105,6 @@
 	})
 }
 
-func TestModuleConfigShTest(t *testing.T) {
-	ctx := android.GroupFixturePreparers(
-		sh.PrepareForTestWithShBuildComponents,
-		android.PrepareForTestWithAndroidBuildComponents,
-		android.FixtureMergeMockFs(android.MockFS{
-			"test.sh":            nil,
-			"testdata/data1":     nil,
-			"testdata/sub/data2": nil,
-		}),
-		android.FixtureRegisterWithContext(RegisterTestModuleConfigBuildComponents),
-	).RunTestWithBp(t, `
-		sh_test {
-			name: "shell_test",
-			src: "test.sh",
-			filename: "test.sh",
-                        test_suites: ["general-tests"],
-			data: [
-				"testdata/data1",
-				"testdata/sub/data2",
-			],
-		}
-                test_module_config {
-                        name: "conch",
-                        base: "shell_test",
-                        test_suites: ["general-tests"],
-                        options: [{name: "SomeName", value: "OptionValue"}],
-                }
-         `)
-	derived := ctx.ModuleForTests("conch", variant) //
-	conch := derived.Module().(*testModuleConfigModule)
-	android.AssertArrayString(t, "TestcaseRelDataFiles", []string{"arm64/testdata/data1", "arm64/testdata/sub/data2"}, conch.provider.TestcaseRelDataFiles)
-	android.AssertStringEquals(t, "Rel OutputFile", "test.sh", conch.provider.OutputFile.Rel())
-
-	// Assert there are rules to create these files.
-	derived.Output("test_module_config.manifest")
-	derived.Output("test_config_fixer/conch.config")
-
-	// Ensure some basic rules exist.
-	entries := android.AndroidMkEntriesForTest(t, ctx.TestContext, derived.Module())[0]
-
-	// Ensure some entries from base are there, specifically support files for data and helper apps.
-	// Do not use LOCAL_COMPATIBILITY_SUPPORT_FILES, but instead use LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES
-	android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config,
-		[]string{"out/soong/target/product/test_device/testcases/conch/arm64/testdata/data1",
-			"out/soong/target/product/test_device/testcases/conch/arm64/testdata/sub/data2"},
-		entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"])
-	android.AssertArrayString(t, "", entries.EntryMap["LOCAL_COMPATIBILITY_SUPPORT_FILES"], []string{})
-
-	android.AssertStringEquals(t, "app class", "NATIVE_TESTS", entries.Class)
-	android.AssertArrayString(t, "required modules", []string{"shell_test"}, entries.EntryMap["LOCAL_REQUIRED_MODULES"])
-	android.AssertArrayString(t, "host required modules", []string{}, entries.EntryMap["LOCAL_HOST_REQUIRED_MODULES"])
-	android.AssertArrayString(t, "cert", []string{}, entries.EntryMap["LOCAL_CERTIFICATE"])
-
-	// And some new derived entries are there.
-	android.AssertArrayString(t, "tags", []string{}, entries.EntryMap["LOCAL_MODULE_TAGS"])
-
-	android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0],
-		fmt.Sprintf("conch/%s/test_config_fixer/conch.config", variant))
-
-	// Check the footer lines.  Our support files should depend on base's support files.
-	convertedActual := make([]string, 4)
-	for i, e := range entries.FooterLinesForTests() {
-		// AssertStringPathsRelativeToTop doesn't replace both instances
-		convertedActual[i] = strings.Replace(e, ctx.Config.SoongOutDir(), "", 2)
-	}
-	android.AssertArrayString(t, fmt.Sprintf("%s", ctx.Config.SoongOutDir()), convertedActual, []string{
-		"include $(BUILD_SYSTEM)/soong_cc_rust_prebuilt.mk",
-		"/target/product/test_device/testcases/conch/arm64/testdata/data1: /target/product/test_device/testcases/shell_test/arm64/testdata/data1",
-		"/target/product/test_device/testcases/conch/arm64/testdata/sub/data2: /target/product/test_device/testcases/shell_test/arm64/testdata/sub/data2",
-		"",
-	})
-
-}
-
 // Make sure we call test-config-fixer with the right args.
 func TestModuleConfigOptions(t *testing.T) {
 
@@ -191,7 +114,7 @@
 	).RunTestWithBp(t, bp)
 
 	// Check that we generate a rule to make a new AndroidTest.xml/Module.config file.
-	derived := ctx.ModuleForTests("derived_test", variant)
+	derived := ctx.ModuleForTests("derived_test", "android_common")
 	rule_cmd := derived.Rule("fix_test_config").RuleParams.Command
 	android.AssertStringDoesContain(t, "Bad FixConfig rule inputs", rule_cmd,
 		`--test-runner-options='[{"Name":"exclude-filter","Key":"","Value":"android.test.example.devcodelab.DevCodelabTest#testHelloFail"},{"Name":"include-annotation","Key":"","Value":"android.platform.test.annotations.LargeTest"}]'`)
@@ -288,7 +211,8 @@
 	).ExtendWithErrorHandler(
 		android.FixtureExpectsAtLeastOneErrorMatchingPattern("Test options must be given")).
 		RunTestWithBp(t, badBp)
-	ctx.ModuleForTests("derived_test", variant)
+
+	ctx.ModuleForTests("derived_test", "android_common")
 }
 
 func TestModuleConfigMultipleDerivedTestsWriteDistinctMakeEntries(t *testing.T) {
@@ -326,7 +250,7 @@
 	).RunTestWithBp(t, multiBp)
 
 	{
-		derived := ctx.ModuleForTests("derived_test", variant)
+		derived := ctx.ModuleForTests("derived_test", "android_common")
 		entries := android.AndroidMkEntriesForTest(t, ctx.TestContext, derived.Module())[0]
 		// All these should be the same in both derived tests
 		android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config,
@@ -336,13 +260,13 @@
 			entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"])
 
 		// Except this one, which points to the updated tradefed xml file.
-		android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0], fmt.Sprintf("derived_test/%s/test_config_fixer/derived_test.config", variant))
+		android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0], "derived_test/android_common/test_config_fixer/derived_test.config")
 		// And this one, the module name.
 		android.AssertArrayString(t, "", entries.EntryMap["LOCAL_MODULE"], []string{"derived_test"})
 	}
 
 	{
-		derived := ctx.ModuleForTests("another_derived_test", variant)
+		derived := ctx.ModuleForTests("another_derived_test", "android_common")
 		entries := android.AndroidMkEntriesForTest(t, ctx.TestContext, derived.Module())[0]
 		// All these should be the same in both derived tests
 		android.AssertStringPathsRelativeToTopEquals(t, "support-files", ctx.Config,
@@ -351,8 +275,7 @@
 				"out/soong/target/product/test_device/testcases/another_derived_test/data/testfile"},
 			entries.EntryMap["LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES"])
 		// Except this one, which points to the updated tradefed xml file.
-		android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0],
-			fmt.Sprintf("another_derived_test/%s/test_config_fixer/another_derived_test.config", variant))
+		android.AssertStringMatches(t, "", entries.EntryMap["LOCAL_FULL_TEST_CONFIG"][0], "another_derived_test/android_common/test_config_fixer/another_derived_test.config")
 		// And this one, the module name.
 		android.AssertArrayString(t, "", entries.EntryMap["LOCAL_MODULE"], []string{"another_derived_test"})
 	}
