From 6ffaaa830dd7311509aa07322810013a874ff8e6 Mon Sep 17 00:00:00 2001 From: Dan Shi Date: Thu, 26 Sep 2019 11:41:36 -0700 Subject: Allow test to specify whether or not to auto-generate test config Attribute `auto_gen_config` is added to test modules. Test config will be generated if: the attribute is not set and AndroidTest.xml doesn't exists or the attribute is set to true, whether or not AndroidTest.xml exists. Test config will NOT be auto-generated if: the attribute is not set and AndroidTest.xml exists or the attribute is set to false, whether or not AndroidTest.xml exists. Bug: 141684102 Test: build test module with auto_gen_config set to true Change-Id: I64fb003a83d8c32a967835e5f8d12fe4476043be --- python/binary.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python/binary.go') 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 { -- cgit v1.2.3-59-g8ed1b