Commit f868d400 authored by Bart van der Velden's avatar Bart van der Velden

Use macrodef instead of old invocations (#50)

parent 09097b14
......@@ -26,40 +26,28 @@
<target name="unittest">
<echo message="Running unit tests" />
<!-- Macro to factor out the common code for each unit test -->
<macrodef name="run_unit_test">
<attribute name="executable" />
<sequential>
<echo message="executable = ${bindir}/@{executable}" />
<property name="output" value="${logdir}/@{executable}.log" />
<echo message="output = ${output}" />
<property name="arg" value="--gtest_output=xml:${logdir}/test_@{executable}.xml" />
<echo message="arg = ${arg}" />
</sequential>
</macrodef>
<!-- Macro to factor out the common code for each unit test -->
<macrodef name="run_unit_test">
<attribute name="executable" />
<sequential>
<echo message="executable = ${bindir}/@{executable}" />
<property name="output" value="${logdir}/@{executable}.log" />
<echo message="output = ${output}" />
<property name="arg" value="--gtest_output=xml:${logdir}/test_@{executable}.xml" />
<echo message="arg = ${arg}" />
<exec
executable="${bindir}/@{executable}"
output="${output}"
append="false">
<arg value="${arg}" />
</exec>
</sequential>
</macrodef>
<!-- Run the actual unit tests -->
<run_unit_test executable="runUtilsTest" />
<exec
executable="${bindir}/runUtilsTest"
output="${logdir}/runUtilsTest.log"
append="false">
<arg value="--gtest_output=xml:${logdir}/test_UtilsTest.xml" />
</exec>
<run_unit_test executable="${bindir}/runCollectionTest" />
<exec
executable="${bindir}/runCollectionTest"
output="${logdir}/runCollectionTest.log"
append="false">
<arg value="--gtest_output=xml:${logdir}/test_CollectionTest.xml" />
</exec>
<run_unit_test executable="${bindir}/runMusicCollectionTest" />
<exec
executable="${bindir}/runMusicCollectionTest"
output="${logdir}/runMusicCollectionTest.log"
append="false">
<arg value="--gtest_output=xml:${logdir}/test_MusicCollectionTest.xml" />
</exec>
<!-- Run the actual unit tests -->
<run_unit_test executable="runUtilsTest" />
<run_unit_test executable="runCollectionTest" />
<run_unit_test executable="runMusicCollectionTest" />
</target>
<!--
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment