diff options
author | 2025-03-04 11:34:55 -0800 | |
---|---|---|
committer | 2025-03-04 11:34:55 -0800 | |
commit | 156085b945de668069e1a35de3a2d3cb4b31618d (patch) | |
tree | c2c6f44e6104c73a2297d30e238ffc023df304a1 /tradefed_modules | |
parent | de3a5c4be8aff15998cbf898e06fcc4679fe911f (diff) |
Build test_module_config modules' module_info_json in soong
To be able to run these tests in soong-only builds.
This cl produces the following diff:
https://paste.googleplex.com/4917659043627008
The diff is enitrely additional host dependencies. Without the line
adding the ExtraHostRequired modules it becomes a diff of missing
host dependencies. Of the two I chose the extras. It's difficult to get
the required list exactly matching make.
Fixes: 400731860
Test: The diff + atest CtsWifiTestCases_NoNonMainlineTest
Change-Id: Idbbfbf7f74eb2eeaf68d64c0bcfbc97ddae3e2ea
Diffstat (limited to 'tradefed_modules')
-rw-r--r-- | tradefed_modules/test_module_config.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tradefed_modules/test_module_config.go b/tradefed_modules/test_module_config.go index 988352cd2..6dd48eb5a 100644 --- a/tradefed_modules/test_module_config.go +++ b/tradefed_modules/test_module_config.go @@ -162,6 +162,22 @@ func (m *testModuleConfigModule) GenerateAndroidBuildActions(ctx android.ModuleC m.validateBase(ctx, &testModuleConfigTag, "android_test", false) m.generateManifestAndConfig(ctx) + moduleInfoJSON := ctx.ModuleInfoJSON() + moduleInfoJSON.Class = []string{m.provider.MkAppClass} + if m.provider.MkAppClass != "NATIVE_TESTS" { + moduleInfoJSON.Tags = append(moduleInfoJSON.Tags, "tests") + } + if m.provider.IsUnitTest { + moduleInfoJSON.IsUnitTest = "true" + } + moduleInfoJSON.CompatibilitySuites = append(moduleInfoJSON.CompatibilitySuites, m.tradefedProperties.Test_suites...) + moduleInfoJSON.SystemSharedLibs = []string{"none"} + moduleInfoJSON.ExtraRequired = append(moduleInfoJSON.ExtraRequired, m.provider.RequiredModuleNames...) + moduleInfoJSON.ExtraRequired = append(moduleInfoJSON.ExtraRequired, *m.Base) + moduleInfoJSON.ExtraHostRequired = append(moduleInfoJSON.ExtraRequired, m.provider.HostRequiredModuleNames...) + moduleInfoJSON.TestConfig = []string{m.testConfig.String()} + moduleInfoJSON.AutoTestConfig = []string{"true"} + moduleInfoJSON.TestModuleConfigBase = proptools.String(m.Base) } // Ensure at least one test_suite is listed. Ideally it should be general-tests |