mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 05:28:34 +00:00
4b528d97ad
(cherry picked from commit 33fc8e7ebfac8d47a5f9f026b3836bb47bea141a)
31 lines
714 B
Groovy
31 lines
714 B
Groovy
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
|