From f18e63a5e5be591f0c4e721e8bd16e2bf50b36f3 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 21 Aug 2018 09:44:55 -0400 Subject: [PATCH] Find CCR QA sub-projects automatically Today we are by-hand maintaining a list of CCR QA sub-projects that the check task depends on. This commit simplifies this by finding these sub-projects automatically and adding their check task as dependencies of the CCR check task. --- x-pack/plugin/ccr/build.gradle | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/x-pack/plugin/ccr/build.gradle b/x-pack/plugin/ccr/build.gradle index 8be8a4ba4b93d..d066769645b5c 100644 --- a/x-pack/plugin/ccr/build.gradle +++ b/x-pack/plugin/ccr/build.gradle @@ -32,12 +32,17 @@ task internalClusterTest(type: RandomizedTestingTask, systemProperty 'es.set.netty.runtime.available.processors', 'false' } +check.dependsOn internalClusterTest internalClusterTest.mustRunAfter test -check.dependsOn( - internalClusterTest, - 'qa:multi-cluster:followClusterTest', - 'qa:multi-cluster-with-incompatible-license:followClusterTest', - 'qa:multi-cluster-with-security:followClusterTest') + +// add all sub-projects of the qa sub-project +gradle.projectsEvaluated { + project.subprojects + .find { it.path == project.path + ":qa" } + .subprojects + .findAll { it.path.startsWith(project.path + ":qa") } + .each { check.dependsOn it.check } +} dependencies { compileOnly "org.elasticsearch:elasticsearch:${version}"