I have an ant file that runs JUnits tests. These tests rely on the relative path to specific configuration files. I tried to set the working directory for the batch test, but could not.
I want the working directory to be ${plugins.dir}/${name}
Part of JUnit ant script:
<junit haltonfailure="no" printsummary="on" fork="true" showoutput="true" dir="${plugins.dir}/${name}">
<jvmarg value="-Duser.dir=${plugins.dir}/${name}"/>
<classpath>
<path refid="project.classpath"/>
<pathelement location="${plugins.dir}/${dependency}/@dot/"/>
<pathelement location="${plugins.dir}/${name}/" />
</classpath>
<formatter type="xml" />
<sysproperty key="basedir" value="${plugins.dir}/${name}"/>
<sysproperty key="dir" value="${plugins.dir}/${name}"/>
<batchtest todir="${junit.output}">
<fileset dir="${dir}">
<include name="**\*AllTests.class" />
</fileset>
</batchtest>
</junit>
I searched googled and searched, but the workarounds that I found were to install "dir", "sysproperty" or "jvmarg". As you can see, I tried all of them :)
Is there a way to print the current directory in a tag? He does not support. This would allow me to check if the directory has really changed and to what.
, , , antrunner. , junit eclipse plugin junit. , .