From efb72f14b700cca2e85a09c8eb5c6d0fd73e91bb Mon Sep 17 00:00:00 2001 From: Yihan Dong Date: Thu, 9 May 2024 13:09:47 +0800 Subject: [PATCH] Exclude mcts tests from cts based on the env config Test: make cts EXCLUDE_MCTS=true Bug: 339554071 Change-Id: Ia81eab597993064f5edc722be6af70bcb143dcab --- core/base_rules.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/base_rules.mk b/core/base_rules.mk index b5941933e3..9c7e906671 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -716,6 +716,14 @@ else test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml) endif +ifeq ($(EXCLUDE_MCTS),true) + ifneq (,$(test_config)) + ifneq (,$(filter mcts-%,$(LOCAL_COMPATIBILITY_SUITE))) + LOCAL_COMPATIBILITY_SUITE := $(filter-out cts,$(LOCAL_COMPATIBILITY_SUITE)) + endif + endif +endif + ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) # If we are building a native test or benchmark and its stem variants are not defined,