Commit 6a02bdea authored by Vít Kabele's avatar Vít Kabele

Disl unit tests are now executed within the subproject.

parent f9715d73
Pipeline #3400 passed with stages
in 3 minutes and 13 seconds
......@@ -24,6 +24,7 @@
<classpathentry kind="src" path="disl/src/src-weaver-pe"/>
<classpathentry kind="src" path="disl/src/src-annotation"/>
<classpathentry kind="src" path="disl/src/src-context"/>
<classpathentry kind="src" path="disl/src-test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="output/lib/disl-bypass.jar"/>
<classpathentry kind="lib" path="lib/disl/log4j.jar" sourcepath="lib/devel/log4j-source.jar"/>
......
......@@ -786,8 +786,12 @@
</sequential>
</macrodef>
<!-- Run nested instrumentation library tests -->
<target name="disl-test">
<ant antfile="${src.disl.prefix}/build.xml" target="test" usenativebasedir="true"/>
</target>
<target name="test" depends="build,build-test" description="Runs all tests or a selected (-Dtest.name=...) test suite.">
<target name="test" depends="build,build-test,disl-test" description="Runs all tests or a selected (-Dtest.name=...) test suite.">
<!--
If test.name is set to a name of a test suite, only include the test suite
in the batch of tests to be run, otherwise include all tests and suites.
......
......@@ -18,3 +18,6 @@ src.disl.staticcontext=src-staticcontext
src.disl.util=src-util
src.disl.weaver-pe=src-weaver-pe
src.disl.weaver=src-weaver
src.disl.test=src-test
build.disl.test=${build.dir}/test
......@@ -17,6 +17,10 @@
<pathelement location="../${build.util}"/>
</path>
<path id="junit.classpath">
<fileset dir="../${lib.test.dir}" includes="*.jar"/>
</path>
<path id="disl.bypass.classpath">
<pathelement location="../${build.disl.bypass}/dynamic"/>
</path>
......@@ -26,6 +30,7 @@
-->
<target name="init">
<mkdir dir="${build.disl}" />
<mkdir dir="${build.disl.test}" />
</target>
<!--
......@@ -41,7 +46,7 @@
<!-- DiSL -->
<target name="compile" depends="compile-util,compile-disl-bypass, init">
<javac destdir="${build.disl}" debug="true">
<javac destdir="${build.disl}" debug="true" includeantruntime="false">
<src path="src/${src.disl.annotation}"/>
<src path="src/${src.disl.classparser}"/>
<src path="src/${src.disl.coderep}"/>
......@@ -69,6 +74,43 @@
</javac>
</target>
<target name="compile-tests" depends="compile">
<javac destdir="${build.disl.test}" debug="true" srcdir="${src.disl.test}" includeantruntime="false">
<classpath>
<path refid="disl.bypass.classpath"/>
<path refid="util.classpath"/>
<path refid="asm.classpath"/>
<path refid="junit.classpath"/>
<path path="${build.disl}"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-tests" description="Run all unit tests">
<echo>Running DiSL intrumentation library tests...</echo>
<junit haltonfailure="yes" haltonerror="yes" failureproperty="junit.failure">
<formatter type="brief" usefile="false"/>
<classpath>
<path refid="asm.classpath"/>
<path refid="junit.classpath"/>
<path path="${build.disl.test}"/>
<path path="../${build.util}"/>
<path path="${build.disl}"/>
</classpath>
<batchtest fork="yes">
<fileset dir="${src.disl.test}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!--
Clean the build directory
-->
<target name="clean">
<delete dir="${out.dir}" />
</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