diff options
author | Colin Cross <ccross@android.com> | 2020-06-09 15:09:22 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2020-06-15 16:46:47 +0000 |
commit | 287638be7eab12892827ec5852ecaca689efbc03 (patch) | |
tree | 8ef1793ea047c60d64976a6478a3524c7053428d /python | |
parent | 03aa290b5266a30346857b75ca963a04be55c15c (diff) | |
download | build_soong-287638be7eab12892827ec5852ecaca689efbc03.tar.gz build_soong-287638be7eab12892827ec5852ecaca689efbc03.tar.bz2 build_soong-287638be7eab12892827ec5852ecaca689efbc03.zip |
Fix using generated test configs for sh_test, python_test and rust_test modules
Annotate the test config properties with android:"path", and always
use LOCAL_FULL_TEST_CONFIG to pass the path to Make.
Bug: 157621988
Test: manual
Change-Id: I1c020e642f83d994d63c9e9cb56e686086d5acaa
Merged-In: I1c020e642f83d994d63c9e9cb56e686086d5acaa
Diffstat (limited to 'python')
-rw-r--r-- | python/androidmk.go | 12 | ||||
-rw-r--r-- | python/test.go | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/python/androidmk.go b/python/androidmk.go index d293d52a..247b80dc 100644 --- a/python/androidmk.go +++ b/python/androidmk.go @@ -66,15 +66,9 @@ func (p *testDecorator) AndroidMk(base *Module, ret *android.AndroidMkData) { fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=", strings.Join(p.binaryDecorator.binaryProperties.Test_suites, " ")) } - // If the test config has an explicit config specified use it. - if p.testProperties.Test_config != nil { - fmt.Fprintln(w, "LOCAL_TEST_CONFIG :=", - *p.testProperties.Test_config) - } else { - if p.testConfig != nil { - fmt.Fprintln(w, "LOCAL_FULL_TEST_CONFIG :=", - p.testConfig.String()) - } + if p.testConfig != nil { + fmt.Fprintln(w, "LOCAL_FULL_TEST_CONFIG :=", + p.testConfig.String()) } if !BoolDefault(p.binaryProperties.Auto_gen_config, true) { diff --git a/python/test.go b/python/test.go index f684fd51..a669c73a 100644 --- a/python/test.go +++ b/python/test.go @@ -29,11 +29,11 @@ func init() { type TestProperties struct { // the name of the test configuration (for example "AndroidTest.xml") that should be // installed with the module. - Test_config *string `android:"arch_variant"` + Test_config *string `android:"path,arch_variant"` // the name of the test configuration template (for example "AndroidTestTemplate.xml") that // should be installed with the module. - Test_config_template *string `android:"arch_variant"` + Test_config_template *string `android:"path,arch_variant"` } type testDecorator struct { |