Autogenerate some extra_options based on some build properties

If an Android.bp specifies Isolated=true, make sure
it's tagged as not-shardable, since b/126376458 is not
resolved.

Test: make bionic-benchmarks-tests (with and without isolated=true)
Bug: 124024827
Change-Id: I2210c15b84f9b30e1cc23b426d463b34cf9ef94f
This commit is contained in:
Julien Desprez
2019-02-28 08:45:28 -08:00
parent 6db4d4e613
commit eb7398ea79
2 changed files with 42 additions and 17 deletions

View File

@@ -243,8 +243,13 @@ func (test *testBinary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
func (test *testBinary) install(ctx ModuleContext, file android.Path) {
test.data = ctx.ExpandSources(test.Properties.Data, nil)
optionsMap := map[string]string{}
if Bool(test.testDecorator.Properties.Isolated) {
optionsMap["not-shardable"] = "true"
}
test.testConfig = tradefed.AutoGenNativeTestConfig(ctx, test.Properties.Test_config,
test.Properties.Test_config_template, test.Properties.Test_suites)
test.Properties.Test_config_template,
test.Properties.Test_suites, optionsMap)
test.binaryDecorator.baseInstaller.dir = "nativetest"
test.binaryDecorator.baseInstaller.dir64 = "nativetest64"