Merge "Add extra_test_configs option" am: ec7a91f9fa am: 82448f2d2d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402168

Change-Id: If619742e8271e804231d029a87f5fa1297959488
This commit is contained in:
Treehugger Robot
2020-08-21 17:26:05 +00:00
committed by Automerger Merge Worker
5 changed files with 45 additions and 7 deletions

View File

@@ -2128,6 +2128,12 @@ func LibraryHostFactory() android.Module {
// Java Tests
//
// Test option struct.
type TestOptions struct {
// a list of extra test configuration files that should be installed with the module.
Extra_test_configs []string `android:"path,arch_variant"`
}
type testProperties struct {
// list of compatibility suites (for example "cts", "vts") that the module should be
// installed into.
@@ -2153,6 +2159,9 @@ type testProperties struct {
// Add parameterized mainline modules to auto generated test config. The options will be
// handled by TradeFed to do downloading and installing the specified modules on the device.
Test_mainline_modules []string
// Test options.
Test_options TestOptions
}
type hostTestProperties struct {
@@ -2181,8 +2190,9 @@ type Test struct {
testProperties testProperties
testConfig android.Path
data android.Paths
testConfig android.Path
extraTestConfigs android.Paths
data android.Paths
}
type TestHost struct {
@@ -2221,6 +2231,8 @@ func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.data = android.PathsForModuleSrc(ctx, j.testProperties.Data)
j.extraTestConfigs = android.PathsForModuleSrc(ctx, j.testProperties.Test_options.Extra_test_configs)
ctx.VisitDirectDepsWithTag(dataNativeBinsTag, func(dep android.Module) {
j.data = append(j.data, android.OutputFileForModule(ctx, dep, ""))
})