Do not convert non-unit tests.
Test: CI
Change-Id: Iab9c134718351187859f34a26bd3a2aa66e009d5
diff --git a/cc/test.go b/cc/test.go
index 7a6cf1b..8c63dc6 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -25,6 +25,7 @@
"android/soong/bazel"
"android/soong/bazel/cquery"
"android/soong/tradefed"
+ "android/soong/ui/metrics/bp2build_metrics_proto"
)
// TestLinkerProperties properties to be registered via the linker
@@ -718,6 +719,13 @@
combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_libs))
data.SetSelectValue(axis, config, combinedData)
tags.SetSelectValue(axis, config, p.Test_options.Tags)
+
+ // TODO: b/300117121 - handle bp2build conversion of non-unit tests
+ // default to true to only handle non-nil falses
+ if !BoolDefault(p.Test_options.Unit_test, true) {
+ ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "Host unit_test = false")
+ return
+ }
}
}
}