[ http://issues.apache.org/jira/browse/DERBY-2006?page=all ]

Andrew McIntyre updated DERBY-2006:
-----------------------------------

    Attachment: derby_2006_v3.diff

Attaching an updated patch which has SecurityManagerTestSetup get the locations 
of junit.jar and ant-junit.jar and updates the policy file so that the 
permissions in the policy file for the code in these jars is now granted 
specifically to them.

Single suites run by setting derby.junit.testname to a testclass and running 
junit-oneclass works fine, e.g.: 

ant 
-Dderby.junit.testname=org.apache.derbyTesting.functionTests.tests.lang._Suite 
junit-oneclass

Strangely, when I run All using the junitreport target, all the tests run and 
pass, but some error (for which Ant/Junit does not provide a stack trace) 
causes junit to print a FAILED message, although Ant then happily generates the 
report showing that all the tests passed and reports BUILD SUCCESSFUL at the 
end:

junit-oneclass:
    [junit] Running org.apache.derbyTesting.functionTests.suites.All
    [junit] Tests run: 1190, Failures: 0, Errors: 1, Time elapsed: 1,335.125 sec
    [junit] Test org.apache.derbyTesting.functionTests.suites.All FAILED

junitreport:
[junitreport] Transform time: 2720ms

BUILD SUCCESSFUL
Total time: 22 minutes 24 seconds

I'm planning on running tests in several other setups before committing this.

> Add JUnit and JUnitReport task as a target in Ant script
> --------------------------------------------------------
>
>                 Key: DERBY-2006
>                 URL: http://issues.apache.org/jira/browse/DERBY-2006
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: Any
>            Reporter: Yip Ng
>         Attachments: derby_2006_v1.diff, derby_2006_v2.diff, 
> derby_2006_v3.diff, example_output.zip
>
>
> Ant has an optional tasks called JUnit and JUnitReport that runs JUnit tests 
> and produces JUnit report respectively.  It will be nice to have these 
> mechanism incorporated into the Ant script so one can easily kick off a JUnit 
> test and view the result. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to