db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1616139 - in /db/derby/code/branches/10.11: ./ java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Date Wed, 06 Aug 2014 09:39:12 GMT
Author: kahatlen
Date: Wed Aug  6 09:39:12 2014
New Revision: 1616139

URL: http://svn.apache.org/r1616139
Log:
DERBY-6685: Permission problems when running JUnit tests with Ant 1.9.4

Merged revision 1616111 from trunk.

Modified:
    db/derby/code/branches/10.11/   (props changed)
    db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
    db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java

Propchange: db/derby/code/branches/10.11/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1616111

Modified: db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?rev=1616139&r1=1616138&r2=1616139&view=diff
==============================================================================
--- db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
(original)
+++ db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
Wed Aug  6 09:39:12 2014
@@ -413,6 +413,13 @@ grant codeBase "${derbyTesting.antjunit}
     permission java.io.FilePermission "${user.dir}${/}*", "write";
 };
 
+// Starting with Ant 1.9.3, write permission has to be granted to ant.jar
+// as well so that Ant's JUnit runner can write test results to a file.
+// Only needed when running the tests under Ant. See DERBY-6685.
+grant codeBase "${derbyTesting.ant}" {
+    permission java.io.FilePermission "${user.dir}${/}*", "write";
+};
+
 // functionTests.tests.lang.RoutineSecurityTest requires this grant
 // to check to see if permissions are granted through generated code
 // through this mechanism.

Modified: db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java?rev=1616139&r1=1616138&r2=1616139&view=diff
==============================================================================
--- db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
(original)
+++ db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Wed Aug  6 09:39:12 2014
@@ -353,6 +353,11 @@ public final class SecurityManagerSetup 
         if (antjunit != null)
             classPathSet.setProperty("derbyTesting.antjunit", antjunit.toExternalForm());
 
+        URL ant = getURL("org.apache.tools.ant.Task");
+        if (ant != null) {
+            classPathSet.setProperty("derbyTesting.ant", ant.toExternalForm());
+        }
+
         // variables for lucene jar files
         URL luceneCore = getURL( "org.apache.lucene.store.FSDirectory" );
         if ( luceneCore != null )



Mime
View raw message