Merge "Add proto for Test ownership metadata." into main

This commit is contained in:
Aditya Choudhary
2023-11-15 10:30:50 +00:00
committed by Gerrit Code Review
18 changed files with 504 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ bootstrap_go_package {
"soong-dexpreopt",
"soong-genrule",
"soong-java-config",
"soong-testing",
"soong-provenance",
"soong-python",
"soong-remoteexec",

View File

@@ -22,6 +22,7 @@ import (
"path/filepath"
"strings"
"android/soong/testing"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@@ -1193,6 +1194,7 @@ func (a *AndroidTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
a.testConfig = a.FixTestConfig(ctx, testConfig)
a.extraTestConfigs = android.PathsForModuleSrc(ctx, a.testProperties.Test_options.Extra_test_configs)
a.data = android.PathsForModuleSrc(ctx, a.testProperties.Data)
ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
}
func (a *AndroidTest) FixTestConfig(ctx android.ModuleContext, testConfig android.Path) android.Path {

View File

@@ -23,6 +23,7 @@ import (
"android/soong/android"
"android/soong/dexpreopt"
"android/soong/testing"
"github.com/google/blueprint/proptools"
@@ -505,6 +506,7 @@ func (b *BootclasspathFragmentModule) GenerateAndroidBuildActions(ctx android.Mo
if ctx.Module() != ctx.FinalModule() {
b.HideFromMake()
}
ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
}
// getProfileProviderApex returns the name of the apex that provides a boot image profile, or an

View File

@@ -27,6 +27,7 @@ import (
"android/soong/bazel"
"android/soong/bazel/cquery"
"android/soong/remoteexec"
"android/soong/testing"
"android/soong/ui/metrics/bp2build_metrics_proto"
"github.com/google/blueprint"
@@ -1228,10 +1229,12 @@ func (j *TestHost) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
j.Test.generateAndroidBuildActionsWithConfig(ctx, configs)
ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
}
func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.generateAndroidBuildActionsWithConfig(ctx, nil)
ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
}
func (j *Test) generateAndroidBuildActionsWithConfig(ctx android.ModuleContext, configs []tradefed.Config) {

View File

@@ -22,6 +22,7 @@ import (
"android/soong/android"
"android/soong/java/config"
"android/soong/testing"
"android/soong/tradefed"
"github.com/google/blueprint/proptools"
@@ -253,6 +254,7 @@ func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext)
}
r.installFile = ctx.InstallFile(installPath, ctx.ModuleName()+".jar", r.combinedJar, installDeps...)
ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
}
func generateRoboTestConfig(ctx android.ModuleContext, outputFile android.WritablePath,