Skip BWC tests in checkPart1 and checkPart2 (#38730)

Don't run bwc tests for check part 1 and 2
This commit is contained in:
Alpar Torok 2019-02-14 17:19:28 +02:00
parent 6c5cec4ff4
commit 99551001cd
1 changed files with 12 additions and 1 deletions

View File

@ -159,7 +159,7 @@ task verifyVersions {
* the enabled state of every bwc task. It should be set back to true
* after the backport of the backcompat code is complete.
*/
final boolean bwc_tests_enabled = true
boolean bwc_tests_enabled = true
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
if (bwc_tests_enabled == false) {
if (bwc_tests_disabled_issue.isEmpty()) {
@ -170,6 +170,17 @@ if (bwc_tests_enabled == false) {
println "See ${bwc_tests_disabled_issue}"
println "==========================================================="
}
if (project.gradle.startParameter.taskNames.find { it.startsWith("checkPart") } != null) {
// Disable BWC tests for checkPart* tasks as it's expected that this will run un it's own check
bwc_tests_enabled = false
}
if (project.gradle.startParameter.taskNames.contains("bwcTestSnapshots") && bwc_tests_enabled == false) {
throw new GradleException("BWC tests are disabled. " +
"This can happen if a branch happened to be created when they were disabled and can be solved by mergin at" +
"least to the commit on the parent branch that re-enabled them"
)
}
subprojects {
ext.bwc_tests_enabled = bwc_tests_enabled
}