summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Liz Kammer <eakammer@google.com> 2020-11-10 10:32:27 -0800
committer Liz Kammer <eakammer@google.com> 2020-11-11 14:10:45 -0800
commit02b6cdf5e35b2713e7c9df23fd483d66db37198c (patch)
tree0b902423954af3dac8179b0c47490b81cef6692e
parent6f83343e7eae8fd826770009cabe1827754152f7 (diff)
Update mts task to make mts-${MODULE} test suites
In addition to a single mts test suite, we want to have slim, per-module mts test suites. This introduces the infrastructure to build a test suite for each module added to mts_modules. Bug: 170318013 Test: m mts Test: m mts-tzdata Change-Id: Ib93ea14e6fa99e362785681cd7660a1ca37e0fe3
-rw-r--r--core/tasks/mts.mk21
1 files changed, 14 insertions, 7 deletions
diff --git a/core/tasks/mts.mk b/core/tasks/mts.mk
index e800505e56..e0848560d1 100644
--- a/core/tasks/mts.mk
+++ b/core/tasks/mts.mk
@@ -13,13 +13,20 @@
# limitations under the License.
ifneq ($(wildcard test/mts/README.md),)
-test_suite_name := mts
-test_suite_tradefed := mts-tradefed
-test_suite_readme := test/mts/README.md
-include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk
+mts_test_suites :=
+mts_test_suites += mts
+
+$(foreach module, $(mts_modules), $(eval mts_test_suites += mts-$(module)))
+
+$(foreach suite, $(mts_test_suites), \
+ $(eval test_suite_name := $(suite)) \
+ $(eval test_suite_tradefed := mts-tradefed) \
+ $(eval test_suite_readme := test/mts/README.md) \
+ $(eval include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk) \
+ $(eval .PHONY: $(suite)) \
+ $(eval $(suite): $(compatibility_zip)) \
+ $(eval $(call dist-for-goals, $(suite), $(compatibility_zip))) \
+)
-.PHONY: mts
-mts: $(compatibility_zip)
-$(call dist-for-goals, mts, $(compatibility_zip))
endif