summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-09-28 00:29:04 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-09-28 00:29:04 +0000
commitdbc2962c42abee3e2e88560d732cb6e7988b8b97 (patch)
tree3f68ee51acc5a004d7ad1df8f6670da1da6e34e7 /java/java.go
parentdfe02f5dc8ca621982ebaf53e059b1ccad0ad0fe (diff)
parent3333889da5b31132fef90848b7630e1b2e793363 (diff)
Merge "TradeFed: Add "test_config_template" flag in Android.bp"
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 3332482c3..0bd7857a0 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1446,6 +1446,10 @@ type testProperties struct {
// installed with the module.
Test_config *string `android:"arch_variant"`
+ // the name of the test configuration template (for example "AndroidTestTemplate.xml") that
+ // should be installed with the module.
+ Test_config_template *string `android:"arch_variant"`
+
// list of files or filegroup modules that provide data that should be installed alongside
// the test
Data []string
@@ -1461,7 +1465,7 @@ type Test struct {
}
func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config)
+ j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.Test_config_template)
j.data = ctx.ExpandSources(j.testProperties.Data, nil)
j.Library.GenerateAndroidBuildActions(ctx)
@@ -1470,6 +1474,7 @@ func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
func (j *Test) DepsMutator(ctx android.BottomUpMutatorContext) {
j.deps(ctx)
android.ExtractSourceDeps(ctx, j.testProperties.Test_config)
+ android.ExtractSourceDeps(ctx, j.testProperties.Test_config_template)
android.ExtractSourcesDeps(ctx, j.testProperties.Data)
}