Tests: Move qa's convert-plugin-name macrodef to dev-tools.

This commit is contained in:
Adrien Grand 2015-08-10 11:07:52 +02:00
parent b1fd0a61da
commit 9bf854752b
2 changed files with 18 additions and 15 deletions

View File

@ -187,6 +187,24 @@
</sequential> </sequential>
</macrodef> </macrodef>
<!-- Takes a plugin zip file and return the plugin name. For instance
'elasticsearch-analysis-icu-2.0.0.zip' would return
'elasticsearch-analysis-icu'. -->
<macrodef name="convert-plugin-name">
<attribute name="file"/>
<attribute name="outputproperty"/>
<sequential>
<local name="file.base"/>
<basename file="@{file}" property="file.base"/>
<filter-property src="file.base" dest="@{outputproperty}">
<chain>
<replaceregex pattern="^elasticsearch-" replace=""/>
<replacestring from="-${elasticsearch.version}.zip" to=""/>
</chain>
</filter-property>
</sequential>
</macrodef>
<!-- unzip the elasticsearch zip --> <!-- unzip the elasticsearch zip -->
<target name="setup-workspace" depends="stop-external-cluster"> <target name="setup-workspace" depends="stop-external-cluster">
<sequential> <sequential>

View File

@ -4,21 +4,6 @@
<import file="${elasticsearch.integ.antfile.default}"/> <import file="${elasticsearch.integ.antfile.default}"/>
<macrodef name="convert-plugin-name">
<attribute name="file"/>
<attribute name="outputproperty"/>
<sequential>
<local name="file.base"/>
<basename file="@{file}" property="file.base"/>
<filter-property src="file.base" dest="@{outputproperty}">
<chain>
<replaceregex pattern="^elasticsearch-" replace=""/>
<replacestring from="-${elasticsearch.version}.zip" to=""/>
</chain>
</filter-property>
</sequential>
</macrodef>
<target name="start-external-cluster-with-plugins" depends="setup-workspace" unless="${shouldskip}"> <target name="start-external-cluster-with-plugins" depends="setup-workspace" unless="${shouldskip}">
<fail message="Expected ${expected.plugin.count} dependencies, are plugins missing from this pom.xml?"> <fail message="Expected ${expected.plugin.count} dependencies, are plugins missing from this pom.xml?">
<condition> <condition>