Add test spec provider to test modules.

Provider added for the following test modules in this change: art_cc_test, cc_benchmark, cc_fuzz, cc_test, cc_test_host, rust_test,and rust_test_host.

Bug: 296873595
Test: Manual test
Change-Id: I815680529bcbecacb3a2bdb8f3746053afdee48c
diff --git a/cc/cc.go b/cc/cc.go
index 814a66c..e215438 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -24,6 +24,7 @@
 	"strconv"
 	"strings"
 
+	"android/soong/testing"
 	"android/soong/ui/metrics/bp2build_metrics_proto"
 
 	"github.com/google/blueprint"
@@ -862,9 +863,10 @@
 	Properties       BaseProperties
 
 	// initialize before calling Init
-	hod       android.HostOrDeviceSupported
-	multilib  android.Multilib
-	bazelable bool
+	hod        android.HostOrDeviceSupported
+	multilib   android.Multilib
+	bazelable  bool
+	testModule bool
 
 	// Allowable SdkMemberTypes of this module type.
 	sdkMemberTypes []android.SdkMemberType
@@ -2329,6 +2331,9 @@
 			}
 		}
 	}
+	if c.testModule {
+		ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
+	}
 
 	c.maybeInstall(ctx, apexInfo)
 }