summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/binary.go5
-rw-r--r--python/test.go3
2 files changed, 7 insertions, 1 deletions
diff --git a/python/binary.go b/python/binary.go
index 140f07af9..695fa123b 100644
--- a/python/binary.go
+++ b/python/binary.go
@@ -47,6 +47,11 @@ type BinaryProperties struct {
// false it will act much like the normal `python` executable, but with the sources and
// libraries automatically included in the PYTHONPATH.
Autorun *bool `android:"arch_variant"`
+
+ // Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
+ // doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
+ // explicitly.
+ Auto_gen_config *bool
}
type binaryDecorator struct {
diff --git a/python/test.go b/python/test.go
index 55b0ab53a..f684fd51d 100644
--- a/python/test.go
+++ b/python/test.go
@@ -50,7 +50,8 @@ func (test *testDecorator) bootstrapperProps() []interface{} {
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.testProperties.Test_config_template, test.binaryDecorator.binaryProperties.Test_suites,
+ test.binaryDecorator.binaryProperties.Auto_gen_config)
test.binaryDecorator.pythonInstaller.dir = "nativetest"
test.binaryDecorator.pythonInstaller.dir64 = "nativetest64"