From 2b8d79c470f8060a68902546aff2e51e60ff5171 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Wed, 21 Aug 2019 11:25:10 -0700 Subject: [PATCH] Add destructiveDistroTest meta task (#45762) This commit adds a destructiveDistroTest task which depends on all of the distribution specific destructive tasks, which can be used by CI. closes #45769 --- .../org/elasticsearch/gradle/test/DistroTestPlugin.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java index ef839016314..799283ab779 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java @@ -95,10 +95,12 @@ public class DistroTestPlugin implements Plugin { TaskProvider copyUpgradeTask = configureCopyUpgradeTask(project, upgradeVersion, upgradeDir); TaskProvider copyPluginsTask = configureCopyPluginsTask(project, pluginsDir); - Map> batsTests = new HashMap<>(); + TaskProvider destructiveDistroTest = project.getTasks().register("destructiveDistroTest"); for (ElasticsearchDistribution distribution : distributions) { - configureDistroTest(project, distribution); + TaskProvider destructiveTask = configureDistroTest(project, distribution); + destructiveDistroTest.configure(t -> t.dependsOn(destructiveTask)); } + Map> batsTests = new HashMap<>(); batsTests.put("bats oss", configureBatsTest(project, "oss", distributionsDir, copyDistributionsTask)); batsTests.put("bats default", configureBatsTest(project, "default", distributionsDir, copyDistributionsTask)); configureBatsTest(project, "plugins",distributionsDir, copyDistributionsTask, copyPluginsTask).configure(t -> @@ -126,7 +128,6 @@ public class DistroTestPlugin implements Plugin { } } - batsTests.forEach((desc, task) -> { configureVMWrapperTask(vmProject, desc, task.getName(), vmDependencies).configure(t -> { t.setProgressHandler(new BatsProgressLogger(project.getLogger()));