Merge "Add test-suite-tag to test_options" am: bf6a8aeec2
am: 433b1c84f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1343577 Change-Id: Id2443a7d496061bbf858eea7a7c4f65b3bec5035
This commit is contained in:
@@ -40,6 +40,8 @@ type TestProperties struct {
|
|||||||
type TestOptions struct {
|
type TestOptions struct {
|
||||||
// The UID that you want to run the test as on a device.
|
// The UID that you want to run the test as on a device.
|
||||||
Run_test_as *string
|
Run_test_as *string
|
||||||
|
// A list of free-formed strings without spaces that categorize the test.
|
||||||
|
Test_suite_tag []string
|
||||||
}
|
}
|
||||||
|
|
||||||
type TestBinaryProperties struct {
|
type TestBinaryProperties struct {
|
||||||
@@ -357,6 +359,9 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) {
|
|||||||
if test.Properties.Test_options.Run_test_as != nil {
|
if test.Properties.Test_options.Run_test_as != nil {
|
||||||
configs = append(configs, tradefed.Option{Name: "run-test-as", Value: String(test.Properties.Test_options.Run_test_as)})
|
configs = append(configs, tradefed.Option{Name: "run-test-as", Value: String(test.Properties.Test_options.Run_test_as)})
|
||||||
}
|
}
|
||||||
|
for _, tag := range test.Properties.Test_options.Test_suite_tag {
|
||||||
|
configs = append(configs, tradefed.Option{Name: "test-suite-tag", Value: tag})
|
||||||
|
}
|
||||||
if test.Properties.Test_min_api_level != nil && test.Properties.Test_min_sdk_version != nil {
|
if test.Properties.Test_min_api_level != nil && test.Properties.Test_min_sdk_version != nil {
|
||||||
ctx.PropertyErrorf("test_min_api_level", "'test_min_api_level' and 'test_min_sdk_version' should not be set at the same time.")
|
ctx.PropertyErrorf("test_min_api_level", "'test_min_api_level' and 'test_min_sdk_version' should not be set at the same time.")
|
||||||
} else if test.Properties.Test_min_api_level != nil {
|
} else if test.Properties.Test_min_api_level != nil {
|
||||||
|
Reference in New Issue
Block a user