summaryrefslogtreecommitdiff
path: root/tradefed_modules
diff options
context:
space:
mode:
author Ronald Braunstein <rbraunstein@google.com> 2024-09-19 23:14:34 +0000
committer Ronald Braunstein <rbraunstein@google.com> 2024-09-19 23:20:23 +0000
commit5c647d8d9741efd4d5ccc67e4b15ea224d58f495 (patch)
tree53f6a8384d89b24b970be65339bd7f474a702fcd /tradefed_modules
parent8996dbc91c48ecb98904c864d6f51579ff79997f (diff)
Fixes host_required_modules for test_module_config
We weren't emitting the needed .mk variable for host_required modules. Test: atest -c CtsLibcoreTestCases_dalvik_system Test: CtsBackupTestCases_cts_permissiontest Bug: b/368357047 Change-Id: I6ed7bd6d64dba0ed93f3eead74752911f63276b2
Diffstat (limited to 'tradefed_modules')
-rw-r--r--tradefed_modules/test_module_config.go1
-rw-r--r--tradefed_modules/test_module_config_test.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/tradefed_modules/test_module_config.go b/tradefed_modules/test_module_config.go
index ef181317d..7a04c1994 100644
--- a/tradefed_modules/test_module_config.go
+++ b/tradefed_modules/test_module_config.go
@@ -242,6 +242,7 @@ func (m *testModuleConfigModule) AndroidMkEntries() []android.AndroidMkEntries {
entries.SetBoolIfTrue("LOCAL_IS_UNIT_TEST", m.provider.IsUnitTest)
entries.AddCompatibilityTestSuites(m.tradefedProperties.Test_suites...)
+ entries.AddStrings("LOCAL_HOST_REQUIRED_MODULES", m.provider.HostRequiredModuleNames...)
// 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.
diff --git a/tradefed_modules/test_module_config_test.go b/tradefed_modules/test_module_config_test.go
index 1510a0331..f76a152eb 100644
--- a/tradefed_modules/test_module_config_test.go
+++ b/tradefed_modules/test_module_config_test.go
@@ -40,6 +40,7 @@ const bp = `
name: "base",
sdk_version: "current",
data: [":HelperApp", "data/testfile"],
+ host_required: ["other-module"],
test_suites: ["general-tests"],
}
@@ -80,6 +81,7 @@ func TestModuleConfigAndroidTest(t *testing.T) {
android.AssertArrayString(t, "", entries.EntryMap["LOCAL_COMPATIBILITY_SUPPORT_FILES"], []string{})
android.AssertArrayString(t, "", entries.EntryMap["LOCAL_REQUIRED_MODULES"], []string{"base"})
+ android.AssertArrayString(t, "", entries.EntryMap["LOCAL_HOST_REQUIRED_MODULES"], []string{"other-module"})
android.AssertArrayString(t, "", entries.EntryMap["LOCAL_CERTIFICATE"], []string{"build/make/target/product/security/testkey.x509.pem"})
android.AssertStringEquals(t, "", entries.Class, "APPS")