Merge pull request #12117 from rmuir/windows_integ_tests
Get integration tests working on windows.
This commit is contained in:
commit
fd1f63529a
|
@ -14,23 +14,29 @@
|
||||||
|
|
||||||
<!-- arguments passed to elasticsearch when running -->
|
<!-- arguments passed to elasticsearch when running -->
|
||||||
<property name="integ.args"
|
<property name="integ.args"
|
||||||
value="-d -Des.node.name=smoke_tester -Des.cluster.name=prepare_release
|
value="-Des.node.name=smoke_tester -Des.cluster.name=prepare_release
|
||||||
-Des.discovery.zen.ping.multicast.enabled=false -Des.script.inline=on
|
-Des.discovery.zen.ping.multicast.enabled=false -Des.script.inline=on
|
||||||
-Des.script.indexed=on -p ${integ.pidfile}"/>
|
-Des.script.indexed=on -Des.pidfile=${integ.pidfile}"/>
|
||||||
|
|
||||||
<!-- runs an OS script -->
|
<!-- runs an OS script -->
|
||||||
<macrodef name="run-script">
|
<macrodef name="run-script">
|
||||||
<attribute name="script"/>
|
<attribute name="script"/>
|
||||||
<attribute name="dir"/>
|
<attribute name="dir"/>
|
||||||
<attribute name="args"/>
|
<attribute name="args"/>
|
||||||
|
<attribute name="spawn" default="false"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<exec executable="cmd" osfamily="winnt" dir="@{dir}" failonerror="true">
|
<local name="failonerror"/>
|
||||||
|
<condition property="failonerror">
|
||||||
|
<isfalse value="@{spawn}"/>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<exec executable="cmd" osfamily="winnt" dir="@{dir}" failonerror="${failonerror}" spawn="@{spawn}">
|
||||||
<arg value="/c"/>
|
<arg value="/c"/>
|
||||||
<arg value="@{dir}/@{script}.bat"/>
|
<arg value="@{dir}/@{script}.bat"/>
|
||||||
<arg line="@{args}"/>
|
<arg line="@{args}"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
<exec executable="sh" osfamily="unix" dir="@{dir}" failonerror="true">
|
<exec executable="sh" osfamily="unix" dir="@{dir}" failonerror="${failonerror}" spawn="@{spawn}">
|
||||||
<arg value="@{dir}/@{script}"/>
|
<arg value="@{dir}/@{script}"/>
|
||||||
<arg line="@{args}"/>
|
<arg line="@{args}"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
@ -67,7 +73,8 @@
|
||||||
|
|
||||||
<!-- execute -->
|
<!-- execute -->
|
||||||
<echo>Starting up external cluster...</echo>
|
<echo>Starting up external cluster...</echo>
|
||||||
<run-script dir="${integ.home}" script="bin/elasticsearch" args="${integ.args} -Des.path.repo=${integ.repo.home}"/>
|
<run-script dir="${integ.home}" script="bin/elasticsearch" spawn="true"
|
||||||
|
args="${integ.args} -Des.path.repo=${integ.repo.home}" />
|
||||||
|
|
||||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
||||||
<http url="http://127.0.0.1:9200"/>
|
<http url="http://127.0.0.1:9200"/>
|
||||||
|
@ -94,11 +101,13 @@
|
||||||
<makeurl property="integ.plugin.url" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
|
<makeurl property="integ.plugin.url" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
|
||||||
|
|
||||||
<echo>Installing plugin ${project.artifactId}...</echo>
|
<echo>Installing plugin ${project.artifactId}...</echo>
|
||||||
<run-script dir="${integ.home}" script="bin/plugin" args="-u ${integ.plugin.url} -i ${project.artifactId}/${project.version}"/>
|
<run-script dir="${integ.home}" script="bin/plugin"
|
||||||
|
args="-u ${integ.plugin.url} -i ${project.artifactId}/${project.version}"/>
|
||||||
|
|
||||||
<!-- execute -->
|
<!-- execute -->
|
||||||
<echo>Starting up external cluster...</echo>
|
<echo>Starting up external cluster...</echo>
|
||||||
<run-script dir="${integ.home}" script="bin/elasticsearch" args="${integ.args} -Des.path.repo=${integ.repo.home}"/>
|
<run-script dir="${integ.home}" script="bin/elasticsearch" spawn="true"
|
||||||
|
args="${integ.args} -Des.path.repo=${integ.repo.home}"/>
|
||||||
|
|
||||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
||||||
<http url="http://127.0.0.1:9200"/>
|
<http url="http://127.0.0.1:9200"/>
|
||||||
|
|
|
@ -41,7 +41,7 @@ sub check_shas_and_licenses {
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( $old_sha eq $new{$jar} ) {
|
unless ( $old_sha eq $new{$jar} ) {
|
||||||
say STDERR "$jar: SHA has changed";
|
say STDERR "$jar: SHA has changed, expected $old_sha but found $new{$jar}";
|
||||||
$error++;
|
$error++;
|
||||||
$sha_error++;
|
$sha_error++;
|
||||||
next;
|
next;
|
||||||
|
|
3
pom.xml
3
pom.xml
|
@ -1176,7 +1176,8 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
|
||||||
<available file="${basedir}/licenses" type="dir"/>
|
<available file="${basedir}/licenses" type="dir"/>
|
||||||
</condition>
|
</condition>
|
||||||
<echo taskName="license check">Running license check</echo>
|
<echo taskName="license check">Running license check</echo>
|
||||||
<exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" >
|
<!-- on windows checksums are calculated wrong -->
|
||||||
|
<exec failonerror="${licenses.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" osfamily="unix" >
|
||||||
<arg value="check_license_and_sha.pl"/>
|
<arg value="check_license_and_sha.pl"/>
|
||||||
<arg value="--check"/>
|
<arg value="--check"/>
|
||||||
<arg value="${basedir}"/>
|
<arg value="${basedir}"/>
|
||||||
|
|
Loading…
Reference in New Issue