Support 'test_config' into soong modules

Test: make general-tests
Bug: 110982517
Change-Id: Ib2eab2653fdfce6f699b85c9fbc64558b6d40363
This commit is contained in:
Julien Desprez
2018-08-02 15:00:46 -07:00
parent 6bfe4eb42c
commit e146e39fa6
6 changed files with 46 additions and 1 deletions

View File

@@ -25,8 +25,20 @@ func init() {
android.RegisterModuleType("python_test", PythonTestFactory)
}
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"`
}
type testDecorator struct {
*binaryDecorator
testProperties TestProperties
}
func (test *testDecorator) bootstrapperProps() []interface{} {
return append(test.binaryDecorator.bootstrapperProps(), &test.testProperties)
}
func (test *testDecorator) install(ctx android.ModuleContext, file android.Path) {