diff options
author | Julien Desprez <jdesprez@google.com> | 2021-03-05 18:08:36 +0000 |
---|---|---|
committer | Julien Desprez <jdesprez@google.com> | 2021-03-05 18:08:36 +0000 |
commit | b216661e84d36bba3a0581b2b0accc76db382c84 (patch) | |
tree | c34ad93410286da46f4b631328b030bc72296d31 /java/java.go | |
parent | 1ab84fa433b0094c459d4dd96da33e36e27a30c3 (diff) |
Revert "Revert "Attempt to run all java_test_host that look unit..."
Revert reland the change after tests have been fixed
Reason for revert: relanding after fixes
Reverted Changes:
I89fbce4d7:Revert "Exclude some tests for java_test_host onbo...
Iaa89f9b7e:Revert "Attempt to run all java_test_host that loo...
Change-Id: Idaa80b2d5a8d3ba026e33b453bd163a4e2d31118
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index dbfad029b..f0eeb29c8 100644 --- a/java/java.go +++ b/java/java.go @@ -2505,6 +2505,11 @@ func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) { } 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. + defaultUnitTest := !inList("tradefed", j.properties.Static_libs) && !inList("tradefed", j.properties.Libs) && !inList("cts", j.testProperties.Test_suites) && !inList("robolectric-host-android_all", j.properties.Static_libs) && !inList("robolectric-host-android_all", j.properties.Libs) + j.testProperties.Test_options.Unit_test = proptools.BoolPtr(defaultUnitTest) + } j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.Test_config_template, j.testProperties.Test_suites, j.testProperties.Auto_gen_config, j.testProperties.Test_options.Unit_test) @@ -2665,6 +2670,7 @@ func TestHostFactory() android.Module { module.Module.properties.Installable = proptools.BoolPtr(true) InitJavaModuleMultiTargets(module, android.HostSupported) + return module } |