summaryrefslogtreecommitdiff
path: root/sdk/testing.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2025-02-11 11:40:13 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-02-11 11:40:13 -0800
commit1dc3511441bae21a32481a22ef7ce8f61a7a2388 (patch)
tree4ef8d45c9ba3ab91eff15d5b8e4840b093dc017e /sdk/testing.go
parent434953e9547aaa6d21c7a124a89f9a3695a9fc4d (diff)
parent6db3e6ffd9b89424d1c78917f80bfaf071c41902 (diff)
Merge changes from topics "apex_transition_info", "bcp_dependency_through_apex" into main am: 5c846d8349 am: 6db3e6ffd9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3470502 Change-Id: I9557fe50d5bdae792487fbc06e64c4b9473c65a9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'sdk/testing.go')
-rw-r--r--sdk/testing.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/sdk/testing.go b/sdk/testing.go
index f5518c46f..cd7bbf58e 100644
--- a/sdk/testing.go
+++ b/sdk/testing.go
@@ -281,7 +281,7 @@ func CheckSnapshot(t *testing.T, result *android.TestResult, name string, dir st
// Run the snapshot with the snapshot preparer and the extra preparer, which must come after as
// it may need to modify parts of the MockFS populated by the snapshot preparer.
- result := android.GroupFixturePreparers(snapshotPreparer, extraPreparer, customizedPreparers).
+ result := android.GroupFixturePreparers(snapshotPreparer, customizedPreparers, extraPreparer).
ExtendWithErrorHandler(customization.errorHandler).
RunTest(t)
@@ -314,6 +314,11 @@ func CheckSnapshot(t *testing.T, result *android.TestResult, name string, dir st
snapshotBpFile := filepath.Join(snapshotSubDir, "Android.bp")
unpreferred := string(fs[snapshotBpFile])
fs[snapshotBpFile] = []byte(strings.ReplaceAll(unpreferred, "prefer: false,", "prefer: true,"))
+
+ prebuiltApexBpFile := "prebuilts/apex/Android.bp"
+ if prebuiltApexBp, ok := fs[prebuiltApexBpFile]; ok {
+ fs[prebuiltApexBpFile] = []byte(strings.ReplaceAll(string(prebuiltApexBp), "prefer: false,", "prefer: true,"))
+ }
})
runSnapshotTestWithCheckers(t, checkSnapshotPreferredWithSource, preferPrebuilts)