Allow adding extra tradefed options in the Android.bp file
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620
diff --git a/python/test.go b/python/test.go
index b9b3465..5781df7 100644
--- a/python/test.go
+++ b/python/test.go
@@ -67,9 +67,14 @@
}
func (test *testDecorator) install(ctx android.ModuleContext, file android.Path) {
- test.testConfig = tradefed.AutoGenPythonBinaryHostTestConfig(ctx, test.testProperties.Test_config,
- test.testProperties.Test_config_template, test.binaryDecorator.binaryProperties.Test_suites,
- test.binaryDecorator.binaryProperties.Auto_gen_config)
+ test.testConfig = tradefed.NewMaybeAutoGenTestConfigBuilder(ctx).
+ SetTestConfigProp(test.testProperties.Test_config).
+ SetTestTemplateConfigProp(test.testProperties.Test_config_template).
+ SetTestSuites(test.binaryDecorator.binaryProperties.Test_suites).
+ SetAutoGenConfig(test.binaryDecorator.binaryProperties.Auto_gen_config).
+ SetDeviceTemplate("${PythonBinaryHostTestConfigTemplate}").
+ SetHostTemplate("${PythonBinaryHostTestConfigTemplate}").
+ Build()
test.binaryDecorator.pythonInstaller.dir = "nativetest"
test.binaryDecorator.pythonInstaller.dir64 = "nativetest64"