summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 6982f522d..8c714eeb2 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2520,6 +2520,10 @@ func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) {
j.deps(ctx)
}
+func (j *TestHost) AddExtraResource(p android.Path) {
+ j.extraResources = append(j.extraResources, p)
+}
+
func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) {
if j.testProperties.Test_options.Unit_test == nil && ctx.Host() {
// TODO(b/): Clean temporary heuristic to avoid unexpected onboarding.
@@ -2683,13 +2687,23 @@ func TestHostFactory() android.Module {
module.AddProperties(&module.testProperties)
module.AddProperties(&module.testHostProperties)
- module.Module.properties.Installable = proptools.BoolPtr(true)
+ InitTestHost(
+ module,
+ proptools.BoolPtr(true),
+ nil,
+ nil)
InitJavaModuleMultiTargets(module, android.HostSupported)
return module
}
+func InitTestHost(th *TestHost, installable *bool, testSuites []string, autoGenConfig *bool) {
+ th.properties.Installable = installable
+ th.testProperties.Auto_gen_config = autoGenConfig
+ th.testProperties.Test_suites = testSuites
+}
+
//
// Java Binaries (.jar file plus wrapper script)
//