Revert "Support generating sdk snapshot for specific build release"

This reverts commit ef2df587be.

Reason for revert: suspect to cause build break in b/201948713

Change-Id: If46219746913bec87ca2030ba51a6094246a0211
This commit is contained in:
Salmax Chang
2021-10-04 05:32:31 +00:00
parent 8194d61ae0
commit 203ec0139b
4 changed files with 2 additions and 169 deletions

View File

@@ -136,7 +136,6 @@ func getSdkSnapshotBuildInfo(t *testing.T, result *android.TestResult, sdk *sdk)
androidUnversionedBpContents: sdk.GetUnversionedAndroidBpContentsForTests(),
androidVersionedBpContents: sdk.GetVersionedAndroidBpContentsForTests(),
snapshotTestCustomizations: map[snapshotTest]*snapshotTestCustomization{},
targetBuildRelease: sdk.builderForTests.targetBuildRelease,
}
buildParams := sdk.BuildParamsForTests()
@@ -254,13 +253,6 @@ func CheckSnapshot(t *testing.T, result *android.TestResult, name string, dir st
}
fs[filepath.Join(snapshotSubDir, "Android.bp")] = []byte(snapshotBuildInfo.androidBpContents)
// If the generated snapshot builders not for the current release then it cannot be loaded by
// the current release.
currentBuildRelease := latestBuildRelease()
if snapshotBuildInfo.targetBuildRelease != currentBuildRelease {
return
}
// The preparers from the original source fixture.
sourcePreparers := result.Preparer()
@@ -484,9 +476,6 @@ type snapshotBuildInfo struct {
// The final output zip.
outputZip string
// The target build release.
targetBuildRelease *buildRelease
// The test specific customizations for each snapshot test.
snapshotTestCustomizations map[snapshotTest]*snapshotTestCustomization
}