Set strict_mode to true
The default strict_mode is now set to true. We are encourage teams to write tests in strict_mode to make tests Bivalent (able to run on device and devicelessly) Ignore-AOSP-First: Due to merge conflicts, will submit in AOSP later after these batch of CLs are merged in git_main Test: atest MyRoboTests Bug: 334089788 Change-Id: I3098e2c1ef1b5fd2ee1a98950db5e4f2e8d87d1e
This commit is contained in:
@@ -116,7 +116,7 @@ func (r *robolectricTest) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
|
||||
if v := String(r.robolectricProperties.Robolectric_prebuilt_version); v != "" {
|
||||
ctx.AddVariationDependencies(nil, libTag, fmt.Sprintf(robolectricPrebuiltLibPattern, v))
|
||||
} else if !proptools.Bool(r.robolectricProperties.Strict_mode) {
|
||||
} else if !proptools.BoolDefault(r.robolectricProperties.Strict_mode, true) {
|
||||
if proptools.Bool(r.robolectricProperties.Upstream) {
|
||||
ctx.AddVariationDependencies(nil, libTag, robolectricCurrentLib+"_upstream")
|
||||
} else {
|
||||
@@ -124,7 +124,7 @@ func (r *robolectricTest) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
}
|
||||
}
|
||||
|
||||
if proptools.Bool(r.robolectricProperties.Strict_mode) {
|
||||
if proptools.BoolDefault(r.robolectricProperties.Strict_mode, true) {
|
||||
ctx.AddVariationDependencies(nil, roboRuntimeOnlyTag, robolectricCurrentLib+"_upstream")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user