From 65cb40a975fb53187cfc5d9edea905b1f7630ab2 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Mon, 21 Oct 2024 15:41:42 -0700 Subject: Add new properties to aid in removing the 1-variant fallback These new properties are essentially methods to specify "outgoing transitions" in blueprint files. There are lots of host tests that want to include apps built for device in their data, so they need a property that adds dependencies based on the device variants instead of copying the same host variants. After this cl is submitted, I'll do an LSC to update all the usages that are relying on the 1-variant fallback to use these properties instead. Bug: 372091092 Test: m nothing --no-skip-soong-tests Change-Id: I45b8fb024da120ad61606e3a21de86e4392be2a4 --- tradefed_modules/test_module_config_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tradefed_modules') diff --git a/tradefed_modules/test_module_config_test.go b/tradefed_modules/test_module_config_test.go index f76a152eb..cf6c7d17f 100644 --- a/tradefed_modules/test_module_config_test.go +++ b/tradefed_modules/test_module_config_test.go @@ -123,24 +123,24 @@ func TestModuleConfigOptions(t *testing.T) { // Ensure we error for a base we don't support. func TestModuleConfigWithHostBaseShouldFailWithExplicitMessage(t *testing.T) { badBp := ` - java_test_host { - name: "base", - srcs: ["a.java"], + java_test { + name: "base", + srcs: ["a.java"], } - test_module_config { - name: "derived_test", - base: "base", - exclude_filters: ["android.test.example.devcodelab.DevCodelabTest#testHelloFail"], - include_annotations: ["android.platform.test.annotations.LargeTest"], - test_suites: ["general-tests"], - }` + test_module_config { + name: "derived_test", + base: "base", + exclude_filters: ["android.test.example.devcodelab.DevCodelabTest#testHelloFail"], + include_annotations: ["android.platform.test.annotations.LargeTest"], + test_suites: ["general-tests"], + }` android.GroupFixturePreparers( java.PrepareForTestWithJavaDefaultModules, android.FixtureRegisterWithContext(RegisterTestModuleConfigBuildComponents), ).ExtendWithErrorHandler( - android.FixtureExpectsAtLeastOneErrorMatchingPattern("'java_test_host' module used as base, but 'android_test' expected")). + android.FixtureExpectsAtLeastOneErrorMatchingPattern("'base' module used as base but it is not a 'android_test' module.")). RunTestWithBp(t, badBp) } -- cgit v1.2.3-59-g8ed1b