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
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
|
||||
"android/soong/android"
|
||||
"android/soong/genrule"
|
||||
"android/soong/snapshot"
|
||||
)
|
||||
|
||||
func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
|
||||
@@ -638,8 +639,10 @@ var PrepareForTestOnFuchsia = android.GroupFixturePreparers(
|
||||
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 @@ func CreateTestContext(config android.Config) *android.TestContext {
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user