Use java host unit tests template for unit tests

Test: make aoa-helper-tests
Bug: 172961860
Change-Id: I2eaee277961f29adfd22e7c65248c9403bd69b81
This commit is contained in:
Julien Desprez
2020-11-19 09:43:45 -08:00
parent 7a64f7e5b6
commit 70898c4006
3 changed files with 9 additions and 4 deletions

View File

@@ -188,7 +188,7 @@ func AutoGenNativeBenchmarkTestConfig(ctx android.ModuleContext, testConfigProp
}
func AutoGenJavaTestConfig(ctx android.ModuleContext, testConfigProp *string, testConfigTemplateProp *string,
testSuites []string, autoGenConfig *bool) android.Path {
testSuites []string, autoGenConfig *bool, unitTest *bool) android.Path {
path, autogenPath := testConfigPath(ctx, testConfigProp, testSuites, autoGenConfig, testConfigTemplateProp)
if autogenPath != nil {
templatePath := getTestConfigTemplate(ctx, testConfigTemplateProp)
@@ -198,7 +198,11 @@ func AutoGenJavaTestConfig(ctx android.ModuleContext, testConfigProp *string, te
if ctx.Device() {
autogenTemplate(ctx, autogenPath, "${JavaTestConfigTemplate}", nil, "")
} else {
autogenTemplate(ctx, autogenPath, "${JavaHostTestConfigTemplate}", nil, "")
if Bool(unitTest) {
autogenTemplate(ctx, autogenPath, "${JavaHostUnitTestConfigTemplate}", nil, "")
} else {
autogenTemplate(ctx, autogenPath, "${JavaHostTestConfigTemplate}", nil, "")
}
}
}
return autogenPath