summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/androidmk.go12
-rw-r--r--android/csuite_config.go2
2 files changed, 13 insertions, 1 deletions
diff --git a/android/androidmk.go b/android/androidmk.go
index 063830b2c..a670656b7 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -177,6 +177,18 @@ func (a *AndroidMkEntries) AddStrings(name string, value ...string) {
a.EntryMap[name] = append(a.EntryMap[name], value...)
}
+// AddCompatibilityTestSuites adds the supplied test suites to the EntryMap, with special handling
+// for partial MTS test suites.
+func (a *AndroidMkEntries) AddCompatibilityTestSuites(suites ...string) {
+ // MTS supports a full test suite and partial per-module MTS test suites, with naming mts-${MODULE}.
+ // To reduce repetition, if we find a partial MTS test suite without an full MTS test suite,
+ // we add the full test suite to our list.
+ if PrefixInList(suites, "mts-") && !InList("mts", suites) {
+ suites = append(suites, "mts")
+ }
+ a.AddStrings("LOCAL_COMPATIBILITY_SUITE", suites...)
+}
+
// The contributions to the dist.
type distContributions struct {
// List of goals and the dist copy instructions.
diff --git a/android/csuite_config.go b/android/csuite_config.go
index a5b15331a..bf24d98c7 100644
--- a/android/csuite_config.go
+++ b/android/csuite_config.go
@@ -44,7 +44,7 @@ func (me *CSuiteConfig) AndroidMkEntries() []AndroidMkEntries {
if me.properties.Test_config != nil {
entries.SetString("LOCAL_TEST_CONFIG", *me.properties.Test_config)
}
- entries.AddStrings("LOCAL_COMPATIBILITY_SUITE", "csuite")
+ entries.AddCompatibilityTestSuites("csuite")
},
}
return []AndroidMkEntries{androidMkEntries}