-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate duplication of BWC testing task setup in script plugin (#…
- Loading branch information
1 parent
e720f11
commit 7309024
Showing
10 changed files
with
55 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import org.elasticsearch.gradle.Version | ||
|
||
ext.bwcTaskName = { Version version -> | ||
return "v${version}#bwcTest" | ||
} | ||
|
||
def bwcTestSnapshots = tasks.register("bwcTestSnapshots") { | ||
if (project.bwc_tests_enabled) { | ||
dependsOn tasks.matching { task -> bwcVersions.unreleased.any { version -> bwcTaskName(version) == task.name } } | ||
} | ||
} | ||
|
||
tasks.register("bwcTest") { | ||
description = 'Runs backwards compatibility tests.' | ||
group = 'verification' | ||
|
||
if (project.bwc_tests_enabled) { | ||
dependsOn tasks.matching { it.name ==~ /v[0-9\.]+#bwcTest/ } | ||
} | ||
} | ||
|
||
tasks.withType(Test).configureEach { | ||
onlyIf { project.bwc_tests_enabled } | ||
} | ||
|
||
tasks.named("check").configure { | ||
dependsOn(bwcTestSnapshots) | ||
} | ||
|
||
test.enabled = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.