Added a build target "unittest-no-junit-report" to run unit tests and
not create a junit report, but instead to show test run results in the ant output stream. Modified .travis.yml to use unittest-no-junit-report instead of unittest, and to change directory to core before doing the build and unittest.
This commit is contained in:
parent
38cb932331
commit
1cfdbf7e3f
@ -2,5 +2,6 @@ language: java
|
|||||||
jdk:
|
jdk:
|
||||||
- oraclejdk7
|
- oraclejdk7
|
||||||
script:
|
script:
|
||||||
- "ant -buildfile core/build.xml clean checkascii build jar"
|
- "cd core"
|
||||||
- "ant -buildfile core/build.xml unittest"
|
- "ant -buildfile build.xml clean checkascii build jar"
|
||||||
|
- "ant -buildfile build.xml unittest-no-junit-report"
|
||||||
|
@ -299,5 +299,36 @@ ${nonascii}</fail>
|
|||||||
Unit tests passed successfully.
|
Unit tests passed successfully.
|
||||||
</echo>
|
</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<!-- Unit test (show errors in output stream instead of junit report) -->
|
||||||
|
<target name="unittest-no-junit-report" description="Execute unit tests, show report to output stream" depends="build">
|
||||||
|
<echo>Building unit tests</echo>
|
||||||
|
<mkdir dir="${build-test.dir}"/>
|
||||||
|
<javac debug="true" srcdir="${src-test.dir}" destdir="${build-test.dir}" classpathref="test-classpath"/>
|
||||||
|
|
||||||
|
<echo>Running unit tests</echo>
|
||||||
|
<mkdir dir="${tmp.dir}/rawtestoutput"/>
|
||||||
|
<junit fork="yes" forkmode="once" printsummary="false" failureproperty="junit.failure">
|
||||||
|
<classpath>
|
||||||
|
<path refid="test-classpath"/>
|
||||||
|
<path location="${basedir}"/>
|
||||||
|
</classpath>
|
||||||
|
<batchtest todir="${tmp.dir}/rawtestoutput">
|
||||||
|
<fileset dir="${build-test.dir}">
|
||||||
|
<include name="**/Test*.class" />
|
||||||
|
<include name="**/*Test.class" />
|
||||||
|
<exclude name="**/*$*.class" />
|
||||||
|
<exclude name="Test.class" />
|
||||||
|
</fileset>
|
||||||
|
<!-- <formatter type="xml"/> -->
|
||||||
|
<formatter type="plain" usefile="false" />
|
||||||
|
</batchtest>
|
||||||
|
</junit>
|
||||||
|
<fail if="junit.failure" message="Unit test(s) failed. See output above for failures."/>
|
||||||
|
<echo>
|
||||||
|
Unit tests passed successfully.
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user