Add Singleton class to collect and validate test spec metadata.

Bug: 296873595
Test: Manual testing (Will add unit test case in the next change.)
Change-Id: Ic4177c5f76602088d52a31ca8d9fbaa703855837
diff --git a/testing/init.go b/testing/init.go
index 8820a60..206b430 100644
--- a/testing/init.go
+++ b/testing/init.go
@@ -18,10 +18,16 @@
 	"android/soong/android"
 )
 
+var (
+	pctx = android.NewPackageContext("android/soong/testing")
+)
+
 func init() {
 	RegisterBuildComponents(android.InitRegistrationContext)
+	pctx.HostBinToolVariable("metadata", "metadata")
 }
 
 func RegisterBuildComponents(ctx android.RegistrationContext) {
 	ctx.RegisterModuleType("test_spec", TestSpecFactory)
+	ctx.RegisterParallelSingletonType("all_test_specs", AllTestSpecsFactory)
 }