From 328448e8cdf43ddaa6d3931ba6a2056797f6d817 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 20 Nov 2018 20:35:53 +0200 Subject: [PATCH] Implement a property to allow for splitting tests. (#35473) --- build.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build.gradle b/build.gradle index 7e016841516..080119bfe57 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,9 @@ import org.elasticsearch.gradle.VersionCollection import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.plugin.PluginBuildPlugin import org.gradle.plugins.ide.eclipse.model.SourceFolder +import com.carrotsearch.gradle.junit4.RandomizedTestingTask + +import java.util.function.Predicate plugins { id 'com.gradle.build-scan' version '1.13.2' @@ -622,3 +625,19 @@ allprojects { } } } + +allprojects { + task checkPart1 + task checkPart2 + tasks.matching { it.name == "check" }.all { check -> + if (check.path.startsWith(":x-pack:")) { + checkPart2.dependsOn check + } else { + checkPart1.dependsOn check + } + } +} + + + +