db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1616477 - in /db/derby/code/branches/10.10: ./ java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Date Thu, 07 Aug 2014 12:16:35 GMT
Author: kahatlen
Date: Thu Aug  7 12:16:35 2014
New Revision: 1616477

URL: http://svn.apache.org/r1616477
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.10/   (props changed)
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java

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

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?rev=1616477&r1=1616476&r2=1616477&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
Thu Aug  7 12:16:35 2014
@@ -410,6 +410,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.10/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java?rev=1616477&r1=1616476&r2=1616477&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Thu Aug  7 12:16:35 2014
@@ -354,6 +354,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());
+        }
+
         // Load indirectly, normally no EMMA jars in the classpath.
         // This property is needed to set correct permissions in policy files.
         URL emma = getURL("com.vladium.emma.EMMAException");



Mime
View raw message