Skip to content

Apache Lucene open-source search software

allow tests to write to clover db

Robert Muir1b85d60d02e2
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 3d497f2fc68..01a95a0537f 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -798,6 +798,7 @@
<!-- Restrict access to certain Java features and install security manager: -->
<sysproperty key="tests.sandbox.dir" value="${build.dir}" />
+ <sysproperty key="clover.db.dir" value="${clover.db.dir}" />
<sysproperty key="java.security.manager" value="java.lang.SecurityManager" />
<sysproperty key="java.security.policy" value="${common.dir}/tools/junit4/tests.policy" />
diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy
index f22126474d3..2b12d776fec 100644
--- a/lucene/tools/junit4/tests.policy
+++ b/lucene/tools/junit4/tests.policy
@@ -27,6 +27,7 @@ grant {
// permissions for file access, write access only to sandbox:
permission java.io.FilePermission "<<ALL FILES>>", "read,execute";
permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete";
+ permission java.io.FilePermission "${clover.db.dir}${/}-", "read,execute,write,delete";
// all possibilities of accepting/binding connections on localhost with ports >=1024:
permission java.net.SocketPermission "localhost:1024-", "accept,listen";