db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1625037 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Date Mon, 15 Sep 2014 14:09:59 GMT
Author: kahatlen
Date: Mon Sep 15 14:09:59 2014
New Revision: 1625037

URL: http://svn.apache.org/r1625037
Log:
DERBY-6736: The jacoco-junit target fails to store coverage data for some sub-suites

Set the jacoco.active property to the empty string when the tests run
under JaCoCo. The code that did this was removed by mistake in
DERBY-6715.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java?rev=1625037&r1=1625036&r2=1625037&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Mon Sep 15 14:09:59 2014
@@ -98,7 +98,16 @@ public final class SecurityManagerSetup 
         return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
                 public Boolean run() {
                     try {
+                        // Check if some arbitrary class from jacocoagent.jar
+                        // is available.
                         Class.forName("org.jacoco.agent.rt.RT");
+
+                        // If we got here, it means the tests are running
+                        // under JaCoCo. Set the jacoco.active property to
+                        // the empty string in order to activate the
+                        // JaCoCo-specific permissions in derby_tests.policy,
+                        // and return true.
+                        System.setProperty("jacoco.active", "");
                         return true;
                     } catch (ClassNotFoundException e) {
                         return false;



Mime
View raw message