Merge "Convert test specific customizers to FixturePreparers" am: b535616a84 am: b7f2455646 am: 3fa8037bde

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647198

Change-Id: I6df4da9131ce4da86babe0d7977dcb04fcf0a8ba
This commit is contained in:
Paul Duffin
2021-03-22 10:00:14 +00:00
committed by Automerger Merge Worker
3 changed files with 106 additions and 74 deletions

View File

@@ -1207,11 +1207,13 @@ func useVendorAllowList(config android.Config) []string {
}).([]string)
}
// setUseVendorAllowListForTest overrides useVendorAllowList and must be called before the first
// call to useVendorAllowList()
func setUseVendorAllowListForTest(config android.Config, allowList []string) {
config.Once(useVendorAllowListKey, func() interface{} {
return allowList
// setUseVendorAllowListForTest returns a FixturePreparer that overrides useVendorAllowList and
// must be called before the first call to useVendorAllowList()
func setUseVendorAllowListForTest(allowList []string) android.FixturePreparer {
return android.FixtureModifyConfig(func(config android.Config) {
config.Once(useVendorAllowListKey, func() interface{} {
return allowList
})
})
}