From fc041efe92c40f0c53c8f02b88a5753fcb7a2a38 Mon Sep 17 00:00:00 2001 From: vadimt Date: Fri, 20 Sep 2019 17:23:11 -0700 Subject: Adding recognition of R launcher builds for test stability rule Change-Id: Icf1251c02d328e634bf4d5c951dd53f203905838 --- .../com/android/launcher3/util/rule/TestStabilityRule.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tests/src') diff --git a/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java b/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java index 8391ae713..8feadbee9 100644 --- a/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java +++ b/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java @@ -37,11 +37,11 @@ public class TestStabilityRule implements TestRule { private static final String TAG = "TestStabilityRule"; private static final Pattern LAUNCHER_BUILD = Pattern.compile("^(" - + "(?BuildFromAndroidStudio)|" - + "(?[0-9]+-eng\\.[a-z]+\\.[0-9]+\\.[0-9]+)|" - + "(?[0-9]+-P[0-9]+)|" - + "(?[0-9]+-[0-9]+|" - + "(?[0-9]+))" + + "(?(BuildFromAndroidStudio|" + + "([0-9]+|[A-Z])-eng\\.[a-z]+\\.[0-9]+\\.[0-9]+))|" + + "(?([0-9]+|[A-Z])-P[0-9]+)|" + + "(?([0-9]+|[A-Z])+-[0-9]+|" + + "(?([0-9]+|[A-Z])+))" + ")$"); private static final Pattern PLATFORM_BUILD = Pattern.compile("^(" @@ -80,8 +80,7 @@ public class TestStabilityRule implements TestRule { if (!launcherBuildMatcher.find()) { Log.e(TAG, "Match not found"); - } else if (launcherBuildMatcher.group("androidStudio") != null - || launcherBuildMatcher.group("commandLine") != null) { + } else if (launcherBuildMatcher.group("local") != null) { launcherLocalBuild = true; } else if (launcherBuildMatcher.group("presubmit") != null) { launcherUnbundledPresubmit = true; -- cgit v1.2.3