From 5fe49e4420bfd6dda9f229b01faed0ba300909c0 Mon Sep 17 00:00:00 2001
From: Robert Muir <rmuir@apache.org>
Date: Wed, 5 Aug 2015 21:45:09 -0400
Subject: [PATCH] cleanup skipping everywhere

---
 .../main/resources/ant/integration-tests.xml  | 25 ++++++++-----------
 distribution/rpm/pom.xml                      |  2 +-
 plugins/pom.xml                               |  2 ++
 qa/smoke-test-plugins/pom.xml                 |  4 ++-
 4 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml
index 9f6c58d7ab8..42e7cd943c3 100644
--- a/dev-tools/src/main/resources/ant/integration-tests.xml
+++ b/dev-tools/src/main/resources/ant/integration-tests.xml
@@ -1,11 +1,6 @@
 <?xml version="1.0"?>
 <project name="elasticsearch-integration-tests">
 
-  <!-- this is all to not run tests for 'pom' packaging. maven you fail -->
-  <condition property="shouldskip">
-    <istrue value="${skip.integ.tests}"/>
-  </condition>
-
   <!-- our pid file for easy cleanup -->
   <property name="integ.pidfile" location="${integ.scratch}/es.pid"/>
 
@@ -176,7 +171,7 @@
   </macrodef>
 
   <!-- unzip the elasticsearch zip -->
-  <target name="setup-workspace" depends="stop-external-cluster" unless="${shouldskip}">
+  <target name="setup-workspace" depends="stop-external-cluster">
     <sequential>
       <delete dir="${integ.scratch}"/>
       <unzip src="${integ.deps}/elasticsearch-${elasticsearch.version}.zip" dest="${integ.scratch}"/>
@@ -198,7 +193,7 @@
   </target>
 
   <!-- unzip core release artifact, install plugin, then start ES -->
-  <target name="start-external-cluster-with-plugin" depends="setup-workspace" unless="${shouldskip}">
+  <target name="start-external-cluster-with-plugin" depends="setup-workspace">
     <install-plugin name="${project.artifactId}" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
     <startup-elasticsearch/>
   </target>
@@ -225,7 +220,7 @@
 
   <!-- distribution tests: .zip -->
 
-  <target name="setup-workspace-zip" depends="stop-external-cluster" unless="${shouldskip}">
+  <target name="setup-workspace-zip" depends="stop-external-cluster">
     <sequential>
       <delete dir="${integ.scratch}"/>
       <unzip src="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip" 
@@ -233,14 +228,14 @@
     </sequential>
   </target>
 
-  <target name="start-external-cluster-zip" depends="setup-workspace-zip" unless="${shouldskip}">
+  <target name="start-external-cluster-zip" depends="setup-workspace-zip">
     <startup-elasticsearch/>
   </target>
 
 
   <!-- distribution tests: .tar.gz -->
 
-  <target name="setup-workspace-tar" depends="stop-external-cluster" unless="${shouldskip}">
+  <target name="setup-workspace-tar" depends="stop-external-cluster">
     <sequential>
       <delete dir="${integ.scratch}"/>
       <untar src="${project.build.directory}/releases/${project.artifactId}-${project.version}.tar.gz" 
@@ -249,13 +244,13 @@
     </sequential>
   </target>
 
-  <target name="start-external-cluster-tar" depends="setup-workspace-tar" unless="${shouldskip}">
+  <target name="start-external-cluster-tar" depends="setup-workspace-tar">
     <startup-elasticsearch/>
   </target>
 
   <!-- distribution tests: .deb -->
 
-  <target name="setup-workspace-deb" depends="stop-external-cluster" unless="${shouldskip}">
+  <target name="setup-workspace-deb" depends="stop-external-cluster">
     <sequential>
       <delete dir="${integ.scratch}"/>
       <mkdir dir="${integ.scratch}/deb-extracted"/>
@@ -275,12 +270,12 @@
     </sequential>
   </target>
 
-  <target name="start-external-cluster-deb" depends="setup-workspace-deb" unless="${shouldskip}">
+  <target name="start-external-cluster-deb" depends="setup-workspace-deb">
     <startup-elasticsearch home="${integ.scratch}/deb-extracted/usr/share/elasticsearch/"/>
   </target>
 
   <!-- distribution tests: .rpm -->
-  <target name="setup-workspace-rpm" depends="stop-external-cluster" unless="${shouldskip}">
+  <target name="setup-workspace-rpm" depends="stop-external-cluster">
     <sequential>
       <delete dir="${integ.scratch}"/>
       <!-- use full paths with paranoia, we will be doing relocations -->
@@ -315,7 +310,7 @@
     </sequential>
   </target>
 
-  <target name="start-external-cluster-rpm" depends="setup-workspace-rpm" unless="${shouldskip}">
+  <target name="start-external-cluster-rpm" depends="setup-workspace-rpm">
     <startup-elasticsearch home="${integ.scratch}/rpm-extracted/usr/share/elasticsearch/"/>
   </target>
 
diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml
index 86da5bba0f2..e390c4a7121 100644
--- a/distribution/rpm/pom.xml
+++ b/distribution/rpm/pom.xml
@@ -24,7 +24,7 @@
     </dependencies>
 
     <properties>
-        <skip.integ.tests>true</skip.integ.tests>
+        <skip.unit.tests>true</skip.unit.tests>
         <rpm.outputDirectory>${project.build.directory}/releases/</rpm.outputDirectory>
     </properties>
 
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 2d8e9387d9c..2f0b9879151 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -309,6 +309,7 @@
                                 <goal>run</goal>
                             </goals>
                             <configuration>
+                                <skip>${skip.integ.tests}</skip>
                                 <target>
                                     <ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster-with-plugin"/>
                                 </target>
@@ -322,6 +323,7 @@
                                 <goal>run</goal>
                             </goals>
                             <configuration>
+                                <skip>${skip.integ.tests}</skip>
                                 <target>
                                     <ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
                                 </target>
diff --git a/qa/smoke-test-plugins/pom.xml b/qa/smoke-test-plugins/pom.xml
index 417dcdc767a..b3cf1b6a12d 100644
--- a/qa/smoke-test-plugins/pom.xml
+++ b/qa/smoke-test-plugins/pom.xml
@@ -45,7 +45,7 @@
                <goal>copy</goal>
              </goals>
              <configuration>
-               <!-- <skip>${skip.integ.tests}</skip> -->
+               <skip>${skip.integ.tests}</skip>
                <useBaseVersion>true</useBaseVersion>
                <outputDirectory>${integ.deps}/plugins</outputDirectory>
 
@@ -197,6 +197,7 @@
                   <property name="expected.plugin.count" value="${expected.plugin.count}"/>
                 </ant>
               </target>
+              <skip>${skip.integ.tests}</skip>
             </configuration>
           </execution>
           <!-- shut down external cluster -->
@@ -210,6 +211,7 @@
               <target>
                 <ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
               </target>
+              <skip>${skip.integ.tests}</skip>
             </configuration>
           </execution>
         </executions>