Merge "16k: soong: Add flag Device_page_size_agnostic" into main
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index e8b8d07..8ccef8d 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -674,6 +674,7 @@
 		"libcodec2_hidl@1.2",
 		"libcodec2_hidl_plugin_stub",
 		"libcodec2_hidl_plugin",
+		"libcodec2_hal_common",
 		"libstagefright_bufferqueue_helper_novndk",
 		"libGLESv2",
 		"libEGL",
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 7534db2..d95ed3f 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -3261,7 +3261,7 @@
 							},
 						},
 						LabelToCcBinary: map[string]cquery.CcUnstrippedInfo{
-							"//:test": cquery.CcUnstrippedInfo{
+							"//:test__tf_internal": cquery.CcUnstrippedInfo{
 								CcAndroidMkInfo: tc.androidMkInfo,
 							},
 							"//:binary": cquery.CcUnstrippedInfo{
diff --git a/cc/test.go b/cc/test.go
index 3f5f710..af1b366 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -641,14 +641,27 @@
 
 var _ BazelHandler = (*ccTestBazelHandler)(nil)
 
+// The top level target named $label is a test_suite target,
+// not the internal cc_test executable target.
+//
+// This is to ensure `b test //$label` runs the test_suite target directly,
+// which depends on tradefed_test targets, instead of the internal cc_test
+// target, which doesn't have tradefed integrations.
+//
+// However, for cquery, we want the internal cc_test executable target, which
+// has the suffix "__tf_internal".
+func mixedBuildsTestLabel(label string) string {
+	return label + "__tf_internal"
+}
+
 func (handler *ccTestBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
 	bazelCtx := ctx.Config().BazelContext
-	bazelCtx.QueueBazelRequest(label, cquery.GetCcUnstrippedInfo, android.GetConfigKey(ctx))
+	bazelCtx.QueueBazelRequest(mixedBuildsTestLabel(label), cquery.GetCcUnstrippedInfo, android.GetConfigKey(ctx))
 }
 
 func (handler *ccTestBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
 	bazelCtx := ctx.Config().BazelContext
-	info, err := bazelCtx.GetCcUnstrippedInfo(label, android.GetConfigKey(ctx))
+	info, err := bazelCtx.GetCcUnstrippedInfo(mixedBuildsTestLabel(label), android.GetConfigKey(ctx))
 	if err != nil {
 		ctx.ModuleErrorf(err.Error())
 		return