From b60ebe0d7f2cfa5f4f7417ff0019a4e8c0f5d737 Mon Sep 17 00:00:00 2001 From: Tongbo Liu Date: Wed, 10 Jul 2024 09:39:38 +0000 Subject: [PATCH] RESTRICT AUTOMERGE: Exclude mcts tests from cts based on the env config, a CP from aosp/3081046. Change-Id: Ic4d5e27ff970fab71bb7e85b1dee261fe9793723 Test: make cts EXCLUDE_MCTS=true Bug: 345592291 --- core/base_rules.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/base_rules.mk b/core/base_rules.mk index c45346989c..ddbfe3fc83 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -725,6 +725,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,