bp2build: Convert cc_test.test_options.tags to cc_test.tags
zeek@ has been tagging unit tests that cannot run on RBE with
"no-remote". While we don't yet have RBE support with standalone `b
test` yet, we can make sure to propagate the tags now.
Bug: 236973602
Test: new unit test
Change-Id: I6d0648f184626bb01c657068804f99ffb82907a3
diff --git a/cc/test.go b/cc/test.go
index 28a0e5e..715c537 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -659,6 +659,7 @@
testBinaryAttrs.binaryAttributes = binaryBp2buildAttrs(ctx, m)
var data bazel.LabelListAttribute
+ var tags bazel.StringListAttribute
testBinaryProps := m.GetArchVariantProperties(ctx, &TestBinaryProperties{})
for axis, configToProps := range testBinaryProps {
@@ -670,6 +671,7 @@
combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_bins))
combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_libs))
data.SetSelectValue(axis, config, combinedData)
+ tags.SetSelectValue(axis, config, p.Test_options.Tags)
}
}
}
@@ -690,6 +692,7 @@
android.CommonAttributes{
Name: m.Name(),
Data: data,
+ Tags: tags,
},
&testBinaryAttrs)
}