Skip to content

Commit 9955100

Browse files
committed
Skip BWC tests in checkPart1 and checkPart2 (#38730)
Don't run bwc tests for check part 1 and 2
1 parent 6c5cec4 commit 9955100

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ task verifyVersions {
159159
* the enabled state of every bwc task. It should be set back to true
160160
* after the backport of the backcompat code is complete.
161161
*/
162-
final boolean bwc_tests_enabled = true
162+
boolean bwc_tests_enabled = true
163163
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
164164
if (bwc_tests_enabled == false) {
165165
if (bwc_tests_disabled_issue.isEmpty()) {
@@ -170,6 +170,17 @@ if (bwc_tests_enabled == false) {
170170
println "See ${bwc_tests_disabled_issue}"
171171
println "==========================================================="
172172
}
173+
if (project.gradle.startParameter.taskNames.find { it.startsWith("checkPart") } != null) {
174+
// Disable BWC tests for checkPart* tasks as it's expected that this will run un it's own check
175+
bwc_tests_enabled = false
176+
}
177+
if (project.gradle.startParameter.taskNames.contains("bwcTestSnapshots") && bwc_tests_enabled == false) {
178+
throw new GradleException("BWC tests are disabled. " +
179+
"This can happen if a branch happened to be created when they were disabled and can be solved by mergin at" +
180+
"least to the commit on the parent branch that re-enabled them"
181+
)
182+
}
183+
173184
subprojects {
174185
ext.bwc_tests_enabled = bwc_tests_enabled
175186
}

0 commit comments

Comments
 (0)