Mercurial > hg > cc > cirrus_home
changeset 192:4275eb6484da
maybe triggers jdb on tests with -DdebugTest=true on command line
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 25 Sep 2024 13:51:15 +0100 |
parents | b5904d0bdfd4 |
children | fff248a65e39 |
files | src/nutch-cc/build.xml |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/nutch-cc/build.xml Wed Sep 25 09:49:12 2024 +0100 +++ b/src/nutch-cc/build.xml Wed Sep 25 13:51:15 2024 +0100 @@ -481,6 +481,8 @@ <!-- ================================================================== --> <!-- Run unit tests --> <!-- ================================================================== --> + <property name="debugTest" value="false"/> + <target name="test" depends="test-core, test-plugins" description="--> run JUnit tests"/> <target name="test-core" depends="compile-core-test, job" description="--> run core JUnit tests only"> @@ -506,10 +508,16 @@ <copy file="${test.src.dir}/filter-all.txt" todir="${test.build.classes}"/> + <condition property="debugJvmArgs" + value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8787" + else="-ea"> + <istrue value="${debugTest}"/> + </condition> <junit printsummary="yes" haltonfailure="no" fork="yes" forkmode="once" dir="${basedir}" errorProperty="tests.failed" failureProperty="tests.failed" maxmemory="1000m"> + <jvmarg value="${debugJvmArgs}"/> <sysproperty key="test.build.data" value="${test.build.data}"/> <sysproperty key="test.src.dir" value="${test.src.dir}"/> <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>