Separate snapshot definition
Current snapshot definition is located in the CC module, so it is
difficult to capture non-CC module (such as prebuilt_etc) to the
snapshot. Separate general snapshot definition from cc so other modules
can also define its own snapshot.
Bug: 192430376
Test: m nothing passed
Change-Id: Ifb69fb3d2ec555b629aa31ec03e7ce5831fd3063
diff --git a/cc/testing.go b/cc/testing.go
index b9d84f6..6a002c0 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -20,6 +20,7 @@
"android/soong/android"
"android/soong/genrule"
+ "android/soong/snapshot"
)
func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
@@ -638,8 +639,10 @@
var PrepareForTestWithCcIncludeVndk = android.GroupFixturePreparers(
PrepareForIntegrationTestWithCc,
android.FixtureRegisterWithContext(func(ctx android.RegistrationContext) {
- VendorSnapshotImageSingleton.Init(ctx)
- recoverySnapshotImageSingleton.init(ctx)
+ snapshot.VendorSnapshotImageSingleton.Init(ctx)
+ snapshot.RecoverySnapshotImageSingleton.Init(ctx)
+ RegisterVendorSnapshotModules(ctx)
+ RegisterRecoverySnapshotModules(ctx)
ctx.RegisterSingletonType("vndk-snapshot", VndkSnapshotSingleton)
}),
)
@@ -687,8 +690,10 @@
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
- VendorSnapshotImageSingleton.Init(ctx)
- recoverySnapshotImageSingleton.init(ctx)
+ snapshot.VendorSnapshotImageSingleton.Init(ctx)
+ snapshot.RecoverySnapshotImageSingleton.Init(ctx)
+ RegisterVendorSnapshotModules(ctx)
+ RegisterRecoverySnapshotModules(ctx)
ctx.RegisterSingletonType("vndk-snapshot", VndkSnapshotSingleton)
RegisterVndkLibraryTxtTypes(ctx)