You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by se...@apache.org on 2010/11/03 10:30:19 UTC
svn commit: r1030375 - in /jakarta/jmeter/trunk: build.xml
test/src/org/apache/jorphan/test/AllTests.java
Author: sebb
Date: Wed Nov 3 09:30:19 2010
New Revision: 1030375
URL: http://svn.apache.org/viewvc?rev=1030375&view=rev
Log:
Ensure test failures are properly progagated
Modified:
jakarta/jmeter/trunk/build.xml
jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java
Modified: jakarta/jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=1030375&r1=1030374&r2=1030375&view=diff
==============================================================================
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Wed Nov 3 09:30:19 2010
@@ -1852,7 +1852,7 @@ run JMeter unless all the JMeter jars ar
<delete quiet="true">
<fileset dir="${basedir}/bin/testfiles" includes="*.jmx.out"/>
</delete>
- <java classname="org.apache.jorphan.test.AllTests" fork="yes" dir="${basedir}/bin">
+ <java classname="org.apache.jorphan.test.AllTests" fork="yes" failonerror="true" dir="${basedir}/bin">
<classpath>
<fileset dir="${dest.jar}" includes="*.jar"/>
<pathelement location="${build.test}"/>
Modified: jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java?rev=1030375&r1=1030374&r2=1030375&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java Wed Nov 3 09:30:19 2010
@@ -30,6 +30,7 @@ import java.util.Properties;
import junit.framework.Test;
import junit.framework.TestCase;
+import junit.framework.TestResult;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
@@ -221,7 +222,7 @@ public final class AllTests {
// the code to not attempt to write to a file, so it will continue
// behaving as it did before. It would be simple to make it write
// to a file instead if that is the desired behavior.
- TestRunner.run(suite);
+ TestResult result = TestRunner.run(suite);
// ++
// Recheck settings:
//System.out.println("+++++++++++");
@@ -241,7 +242,7 @@ public final class AllTests {
// }
//System.out.println("------------");
// --
- System.exit(0); // this is needed because the test may start the AWT EventQueue thread which is not a daemon.
+ System.exit(result.wasSuccessful() ? 0 : 1); // this is needed because the test may start the AWT EventQueue thread which is not a daemon.
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org