harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib][testing] Showing test failures (Re: [drlvm] New regression: java.lang.ClassGenericsTest4)
Date Wed, 15 Nov 2006 21:58:31 GMT
Rana Dasgupta wrote:
> I think that a problem with the junit tests is that some failures spit out
> to the console, but show up in the test run results as passed. I find this
> very confusing. So unless you are watching all the time, you can miss them.

Hmm, this doesn't sound right.  I've not seen classlib tests fail but be
reported in the html report as passed.  Is that what you meant? (I
realize your mail subject was [drlvm] but just checking.)

One confusing aspect is that the classlib ant build fails if you run the
tests 'globally', but passes if you run the tests in a single module.

We could fix that by making the current test sequence an internal target
(for the 'global' test), and checking for failures after a 'modular' test.


Index: build.xml
--- build.xml	(revision 474801)
+++ build.xml	(working copy)
@@ -41,8 +41,19 @@

     <target name="build" depends="compile-java, copy-resources,
build-jar" />

-    <target name="test" depends="build, compile-tests, run-tests" />
+    <target name="test" depends="-test">
+        <fail message="Some tests failed">
+            <condition>
+                <or>
+                    <isset property="test.failures" />
+                    <isset property="test.errors" />
+                </or>
+            </condition>
+        </fail>
+    </target>

+    <target name="-test" depends="build, compile-tests, run-tests" />
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/beans.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/beans-src.jar" />

That would be more intuitive to me, so unless anyone objects I'll do it.



Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

View raw message