[SPR-5889] Customized Spring Build to include TestNG tests in the automated build process; added global build.versions properties file as well.
This commit is contained in:
parent
91c9f544b1
commit
ceffa783d4
|
|
@ -0,0 +1,2 @@
|
|||
org.testng.version=5.9.0
|
||||
org.junit.version=4.6.0
|
||||
|
|
@ -1,6 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="org.springframework.test">
|
||||
<project name="org.springframework.test" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<property file="${basedir}/../build.properties"/>
|
||||
<property file="${basedir}/../build.versions"/>
|
||||
|
||||
<import file="${basedir}/../build-spring-framework/package-bundle.xml"/>
|
||||
<import file="${basedir}/../spring-build/standard/default.xml"/>
|
||||
|
||||
<!-- Macros -->
|
||||
<macrodef name="test-run">
|
||||
<attribute name="classpath.id"/>
|
||||
<sequential>
|
||||
|
||||
<condition property="test.halt" value="false" else="true">
|
||||
<istrue value="${ci.build}"/>
|
||||
</condition>
|
||||
<mkdir dir="${test-results.output.dir}/xml"/>
|
||||
<junit forkmode="perBatch" dir="${basedir}" haltonerror="${test.halt}" haltonfailure="${test.halt}">
|
||||
<jvmarg line="${test.vm.args}"/>
|
||||
<syspropertyset>
|
||||
<propertyref builtin="commandline"/>
|
||||
</syspropertyset>
|
||||
<classpath refid="@{classpath.id}"/>
|
||||
<test fork="yes" todir="${test-results.output.dir}/xml" name="${testcase}" if="testcase"/>
|
||||
<batchtest fork="yes" todir="${test-results.output.dir}/xml" unless="testcase">
|
||||
<fileset dir="${test.output.dir}" includes="**/*Test.class,**/*Tests.class"
|
||||
excludes="**/Abstract*.class,**/*TestNG*.class"/>
|
||||
</batchtest>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
</junit>
|
||||
|
||||
<ivy:cachepath resolveId="testng.classpath" pathid="testng.classpath" organisation="org.testng"
|
||||
module="com.springsource.org.testng" revision="${org.testng.version}"
|
||||
conf="runtime" type="jar" inline="true" log="download-only"/>
|
||||
<taskdef name="testng" classpathref="testng.classpath" classname="org.testng.TestNGAntTask" />
|
||||
<mkdir dir="${test-results.output.dir}/testng"/>
|
||||
<testng outputdir="${test-results.output.dir}/testng" haltonfailure="true" haltonskipped="true" verbose="2">
|
||||
<jvmarg line="-Djava.awt.headless=true -Xmx256m -XX:MaxPermSize=128m"/>
|
||||
<classpath refid="@{classpath.id}"/>
|
||||
<classfileset dir="${test.output.dir}" includes="**/testng/**/*Tests.class" excludes="**/Abstract*" />
|
||||
</testng>
|
||||
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue