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
diff --git a/cc/test.go b/cc/test.go
index e9f0944..8e49fac 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -243,8 +243,13 @@
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"