You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Sunitha Kambhampati <ks...@gmail.com> on 2006/10/26 23:37:43 UTC
DERBY-2006, adding ant task to generate html report. (was Re: Test
count dropping?)
Andrew McIntyre wrote:
>
> I've attached a patch to DERBY-2006 that adds basic support for this
> to our top-level build.xml. With the patch running 'ant junitreport'
> runs the All suite and generates an HTML report.
>
Thanks Andrew for working on this. I applied the patch attached to
derby-2006 and after adding junit.jar to the $ANT_HOME/lib path, I can
run the junitreport task.
First time I ran, my classpath settings were not correct so the tests
didnt run but I got the report saying classnotfound so that was expected.
Second time I ran, I am getting this error:
[junitreport] [Fatal Error] :-1:-1: Premature end of file.
[junitreport] The file
C:\workghm\svnclient\ks_trunk\junit\TEST-org.apache.derbyTesting.functionTests.suites.All.xml
is not a valid XML document. It is possibly corrupted.
I see a file:
/junit/org/apache/derbyTesting/functionTests/suites/0_All.html amd that
has the following exception
org.apache.derbyTesting.functionTests.suites.All
|java.lang.ClassNotFoundException:
org.apache.derbyTesting.functionTests.suites.All at
java.net.URLClassLoader.findClass(URLClassLoader.java:376) at
java.lang.ClassLoader.loadClass(ClassLoader.java:572) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442) at
java.lang.ClassLoader.loadClass(ClassLoader.java:504) at
java.lang.Class.forName1(Native Method) at
java.lang.Class.forName(Class.java:180)
|What could I be doing wrong ?
Here is the output :
ks_trunk>ant junitreport
Buildfile: build.xml
junit-init:
junit-all:
junit-oneclass:
[junit] Running org.apache.derbyTesting.functionTests.suites.All
[junit] Exception in thread "main"
java.security.AccessControlException: access denied
(java.lang.RuntimePermission setIO)
[junit] at
java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled
Code))
[junit] at
java.security.AccessController.checkPermission(AccessController.java(Compiled
Code))
[junit] at
java.lang.SecurityManager.checkPermission(SecurityManager.java(Compiled
Code))
[junit] at java.lang.System.checkIO(System.java:225)
[junit] at java.lang.System.setOut(System.java:189)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:309)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
[junit] Test org.apache.derbyTesting.functionTests.suites.All FAILED
junitreport:
[junitreport] [Fatal Error] :-1:-1: Premature end of file.
[junitreport] The file
C:\workghm\svnclient\ks_trunk\junit\TEST-org.apache.derbyTesting.functionTests.suites.All.xml
is not a valid XML document. It is possibly corrupted.
[junitreport] Transform time: 741ms
BUILD SUCCESSFUL
Total time: 9 minutes 29 seconds
ks_trunk>
----------------
Thanks,
Sunitha.
Re: DERBY-2006, adding ant task to generate html report. (was Re:
Test count dropping?)
Posted by Rajesh Kartha <ka...@gmail.com>.
Andrew McIntyre wrote:
> On 10/26/06, Sunitha Kambhampati <ks...@gmail.com> wrote:
>
>>
>> Thanks Andrew for working on this. I applied the patch attached to
>> derby-2006 and after adding junit.jar to the $ANT_HOME/lib path, I can
>> run the junitreport task.
>
>
> Do you have junit.jar in tools/java? I was hoping this wouldn't be
> necessary.
>
After applying the patch I did not see any path element in the build.xml
pointing to tools.java/junit.jar, could
that be the reason.
All the jars in $ANT_HOME/lib are accessible to the ant, hence placing
the junit.jar always works.
But I do think the new ant task should utilize the junit.jar from the
tools/java rather than placing it in
the $ANT_HOME/lib.
-Rajesh
Re: DERBY-2006, adding ant task to generate html report. (was Re: Test count dropping?)
Posted by Andrew McIntyre <mc...@gmail.com>.
On 10/26/06, Sunitha Kambhampati <ks...@gmail.com> wrote:
>
> Thanks Andrew for working on this. I applied the patch attached to
> derby-2006 and after adding junit.jar to the $ANT_HOME/lib path, I can
> run the junitreport task.
Do you have junit.jar in tools/java? I was hoping this wouldn't be necessary.
> junit-oneclass:
> [junit] Running org.apache.derbyTesting.functionTests.suites.All
> [junit] Exception in thread "main"
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission setIO)
This looks like the change to derby_tests.policy was not picked up for
some reason. Could you check that the test policy change is reflected
in your classes dir?
andrew