Skip to content

Commit 913c796

Browse files
johnmayegonw
authored andcommitted
- Added properties for JVM arguments this allows us to switch on/off debugging and stdout via ant. This is useful as it can be seen from the run target debug had been commented out. The properties allow us to explicitly turn off debugging (on by default) - Used properties for junit-test, run-test and run targets - Added jarTestData as a required target before junit-test can be run
Change-Id: I7b94641a6893fa1e3ec1047a1a67b7291b03a6e2 Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
1 parent aed8a5d commit 913c796

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

build.xml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
<property name="arg3" value="" />
3636
<property name="arg4" value="" />
3737

38+
<!-- jvm arguments -->
39+
<property name="jvmarg.cdk.debugging" value="true"
40+
description="print debug logging statements"/>
41+
<property name="jvmarg.cdk.stdout" value="true"/>
42+
3843
<!-- jar file names for libraries used for compiling -->
3944
<property name="javaccjar" value="javacc.jar" />
4045
<property name="antcontribjar" value="ant-contrib-1.0b3.jar" />
@@ -1124,7 +1129,8 @@
11241129
-Dtestclass=&lt;class>.">
11251130
<echo message="Running test class: testclass=${testclass}"/>
11261131
<java classname="org.openscience.cdk.${testclass}" fork="yes" maxmemory="512m">
1127-
<jvmarg value="-Dcdk.debugging=true"/>
1132+
<jvmarg value="-Dcdk.debugging=${jvmarg.cdk.debugging}"/>
1133+
<jvmarg value="-Dcdk.debug.stdout=${jvmarg.cdk.stdout}"/>
11281134
<classpath>
11291135
<fileset dir="${dist}/jar/">
11301136
<include name="*.jar" />
@@ -1139,12 +1145,12 @@
11391145
</java>
11401146
</target>
11411147

1142-
<target id="junit-test" name="junit-test" depends="dist-all,test-dist-all,noJunit"
1148+
<target id="junit-test" name="junit-test" depends="dist-all,jarTestdata,test-dist-all,noJunit"
11431149
description="Runs one specific JUnit test suite (org.openscience.cdk.&lt;class>) with -Dtestclass=&lt;class>.">
1144-
<echo message="JUnit tests class: testclass=${testclass}"/>
1145-
<junit printsummary="yes" haltonfailure="no" fork="yes">
1146-
<jvmarg value="-Dcdk.debugging=true"/>
1147-
<jvmarg value="-Dcdk.debug.stdout=true"/>
1150+
<echo message="JUnit tests class: testclass=${testclass} [JVM Arguments: cdk.debugging=${cdk.debugging}, ${jvmarg.cdk.stdout}]"/>
1151+
<junit printsummary="yes" haltonfailure="no" fork="yes" maxmemory="512m">
1152+
<jvmarg value="-Dcdk.debugging=${jvmarg.cdk.debugging}"/>
1153+
<jvmarg value="-Dcdk.debug.stdout=${jvmarg.cdk.stdout}"/>
11481154
<classpath>
11491155
<fileset dir="${dist}/jar/">
11501156
<include name="*.jar" />
@@ -1170,14 +1176,13 @@
11701176
<target id="run" name="run" depends="dist-all"
11711177
description="Runs an application (org.openscience.cdk.&lt;class>) with -Drunclass=&lt;class>.">
11721178
<java classname="org.openscience.cdk.${runclass}" fork="yes" >
1173-
<!--jvmarg value="-Dcdk.debugging=true"/>
1174-
<jvmarg value="-Dcdk.debug.stdout=true"/-->
1175-
1176-
<arg value="${arg1}" />
1177-
<arg value="${arg2}" />
1178-
<arg value="${arg3}" />
1179-
<arg value="${arg4}" />
1180-
<classpath>
1179+
<jvmarg value="-Dcdk.debugging=${jvmarg.cdk.debugging}"/>
1180+
<jvmarg value="-Dcdk.debug.stdout=${jvmarg.cdk.stdout}"/>
1181+
<arg value="${arg1}" />
1182+
<arg value="${arg2}" />
1183+
<arg value="${arg3}" />
1184+
<arg value="${arg4}" />
1185+
<classpath>
11811186
<fileset dir="${dist}/jar">
11821187
<include name="*.jar" />
11831188
</fileset>

0 commit comments

Comments
 (0)