summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-08-21 16:22:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-08-21 16:22:43 +0000
commitec7a91f9fa303e64fa62dbf74b03fcf1f50ca944 (patch)
treefd1f8d6f63e3250a458e68b24c3ea3e9e8e2f8ab /java/java.go
parentf5a2b8a64113630ce0d8d5922f96e951fb2c9f12 (diff)
parent95d19422a679f9947b8989c2245977a29c75b9fa (diff)
Merge "Add extra_test_configs option"
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go
index 25fba13e2..ec778966d 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2124,6 +2124,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.
@@ -2149,6 +2155,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 {
@@ -2177,8 +2186,9 @@ type Test struct {
testProperties testProperties
- testConfig android.Path
- data android.Paths
+ testConfig android.Path
+ extraTestConfigs android.Paths
+ data android.Paths
}
type TestHost struct {
@@ -2217,6 +2227,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, ""))
})