[classlib][testing] Showing test failures (Re: [drlvm] New regression: java.lang.ClassGenericsTest4)

2006-11-15 Thread Tim Ellison
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.

e.g.

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.

Regards,
Tim

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.


Re: [classlib][testing] Showing test failures (Re: [drlvm] New regression: java.lang.ClassGenericsTest4)

2006-11-15 Thread Alexey Varlamov

2006/11/16, Tim Ellison [EMAIL PROTECTED]:

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.


Yes, this was a nasty surprise for me when I saw exactly this
sutiation few days ago; I just had no time to speak up. We definitely
should fix this.



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.

e.g.

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.


Absolutely reasonable solution, please do. Thank you so much!

--
Alexey



Regards,
Tim

--

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.