summaryrefslogtreecommitdiff
path: root/tradefed_modules/test_suite.go
diff options
context:
space:
mode:
Diffstat (limited to 'tradefed_modules/test_suite.go')
-rw-r--r--tradefed_modules/test_suite.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/tradefed_modules/test_suite.go b/tradefed_modules/test_suite.go
index cc35ce72c..00585f5f6 100644
--- a/tradefed_modules/test_suite.go
+++ b/tradefed_modules/test_suite.go
@@ -24,6 +24,8 @@ import (
"github.com/google/blueprint"
)
+const testSuiteModuleType = "test_suite"
+
type testSuiteTag struct{
blueprint.BaseDependencyTag
}
@@ -38,7 +40,7 @@ func init() {
}
func RegisterTestSuiteBuildComponents(ctx android.RegistrationContext) {
- ctx.RegisterModuleType("test_suite", TestSuiteFactory)
+ ctx.RegisterModuleType(testSuiteModuleType, TestSuiteFactory)
}
var PrepareForTestWithTestSuiteBuildComponents = android.GroupFixturePreparers(
@@ -69,8 +71,15 @@ func (t *testSuiteModule) DepsMutator(ctx android.BottomUpMutatorContext) {
}
func (t *testSuiteModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+ suiteName := ctx.ModuleName()
modulesByName := make(map[string]android.Module)
ctx.WalkDeps(func(child, parent android.Module) bool {
+ // Recurse into test_suite dependencies.
+ if ctx.OtherModuleType(child) == testSuiteModuleType {
+ ctx.Phony(suiteName, android.PathForPhony(ctx, child.Name()))
+ return true
+ }
+
// Only write out top level test suite dependencies here.
if _, ok := ctx.OtherModuleDependencyTag(child).(testSuiteTag); !ok {
return false
@@ -85,7 +94,6 @@ func (t *testSuiteModule) GenerateAndroidBuildActions(ctx android.ModuleContext)
return false
})
- suiteName := ctx.ModuleName()
var files []string
for name, module := range modulesByName {
// Get the test provider data from the child.
@@ -115,7 +123,7 @@ func TestSuiteFactory() android.Module {
module := &testSuiteModule{}
module.AddProperties(&module.testSuiteProperties)
- android.InitAndroidModule(module)
+ android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
android.InitDefaultableModule(module)
return module