aboutsummaryrefslogtreecommitdiff
path: root/dexpreopt
diff options
context:
space:
mode:
authorJiakai Zhang <jiakaiz@google.com>2021-12-13 17:19:05 +0000
committerJiakai Zhang <jiakaiz@google.com>2021-12-14 10:55:12 +0000
commit7d3c9e0b5f54bd6f61a973e1360262949a035c87 (patch)
tree453c23a251d5c9b9a09160416cee417b0769e066 /dexpreopt
parentd469eefcc30a879c28c440965bbc06683d3a9be3 (diff)
Test that `DisableGenerateProfile` takes effects for APEXes.
Bug: 209630530 Test: m nothing Change-Id: I5953f36e219ba63f8a01fa5dc60456db35eef5ac
Diffstat (limited to 'dexpreopt')
-rw-r--r--dexpreopt/testing.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/dexpreopt/testing.go b/dexpreopt/testing.go
index 5131cd3f4..47ae494e3 100644
--- a/dexpreopt/testing.go
+++ b/dexpreopt/testing.go
@@ -167,3 +167,10 @@ func FixtureSetBootImageProfiles(profiles ...string) android.FixturePreparer {
dexpreoptConfig.BootImageProfiles = android.PathsForSource(ctx, profiles)
})
}
+
+// FixtureDisableGenerateProfile sets the DisableGenerateProfile property in the global config.
+func FixtureDisableGenerateProfile(disable bool) android.FixturePreparer {
+ return FixtureModifyGlobalConfig(func(_ android.PathContext, dexpreoptConfig *GlobalConfig) {
+ dexpreoptConfig.DisableGenerateProfile = disable
+ })
+}