Skip to content

Commit b8f607c

Browse files
committed
Fix up so unit tests work OK
Allow build.xml to run a single test by defining test.entry git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@919127 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0fb00f9 commit b8f607c

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

build.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ limitations under the License.
198198
<record name="${build.home}/test-output.txt" append="no" action="start"/>
199199
<junit printsummary="yes" haltonfailure="yes">
200200
<classpath refid="test.classpath"/>
201-
<formatter type="plain"/>
202-
<batchtest fork="yes" todir="${build.home}/test-reports">
201+
<formatter type="plain" usefile="true" />
202+
<!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
203+
<test name="${test.entry}" todir="${build.home}/test-reports" if="test.entry"/>
204+
<batchtest fork="yes" todir="${build.home}/test-reports" unless="test.entry">
203205
<fileset dir="${test.home}">
204206
<include name="**/*Test.java"/>
205207
<exclude name="**/*AbstractTest.java"/>

default.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717

1818
# $Id$
1919

20+
# Repository base path
21+
repository=${user.home}/.m2/repository
22+
2023
# The pathname of the "junit.jar" JAR file
21-
junit.jar = ${junit.home}/junit.jar
24+
junit.home=${repository}/junit/junit/3.8.2
25+
junit.jar = ${junit.home}/junit-3.8.2.jar
2226

2327
# The name of this component
2428
component.name = commons-codec
@@ -71,6 +75,3 @@ test.failonerror = true
7175

7276
# The test runner to execute
7377
test.runner = junit.textui.TestRunner
74-
75-
# Root test class to execute
76-
test.entry = org.apache.commons.codec.TestAll

0 commit comments

Comments
 (0)