From 5e1454aef7f1e97890b11db5c85b7655ce8f7380 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 11 Mar 2025 15:55:59 -0700 Subject: Expand TestSuiteInfoProvider to all test modules Test suites have been historically only defined in the AndroidMk functions. But in soong-only builds, we don't run AndroidMk. It appears Colin already started making a TestSuiteInfo provider, but hadn't set it on all test modules yet. Expand it to all the test modules, and add export it to make so that make can check that it matches LOCAL_COMPATIBILITY_SUITES. Bug: 388850000 Test: m nothing Change-Id: Iee8959742117604fd560c95be60f3cb7cf3d9ae4 --- java/java.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 235a27d4c..92de1c1ff 100644 --- a/java/java.go +++ b/java/java.go @@ -1954,6 +1954,10 @@ func (j *Test) generateAndroidBuildActionsWithConfig(ctx android.ModuleContext, ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.outputFile) } } + + android.SetProvider(ctx, android.TestSuiteInfoProvider, android.TestSuiteInfo{ + TestSuites: j.testProperties.Test_suites, + }) } func (j *TestHelperLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { @@ -1970,6 +1974,10 @@ func (j *TestHelperLibrary) GenerateAndroidBuildActions(ctx android.ModuleContex if optionalConfig.Valid() { moduleInfoJSON.TestConfig = append(moduleInfoJSON.TestConfig, optionalConfig.String()) } + + android.SetProvider(ctx, android.TestSuiteInfoProvider, android.TestSuiteInfo{ + TestSuites: j.testHelperLibraryProperties.Test_suites, + }) } func (j *JavaTestImport) GenerateAndroidBuildActions(ctx android.ModuleContext) { -- cgit v1.2.3-59-g8ed1b