Skip to content

Commit

Permalink
(WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Apr 18, 2023
1 parent a0c0fad commit 5522e1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,17 @@
</jacoco:coverage>
</target>

<target name="testSecurityManager">
<jacoco:coverage destfile="${exec.file}">
<java classname="org.jacoco.ant.TestTarget" fork="true" failonerror="true">
<classpath path="${org.jacoco.ant.coverageTaskTest.classes.dir}"/>
<jvmarg value="-Djacoco.location=${_jacoco.agentFile}"/>
<jvmarg value="-Djava.security.manager"/>
<jvmarg value="-Djava.security.policy==${basedir}/data/policy.txt"/>
</java>
</jacoco:coverage>

<au:assertFileExists file="${exec.file}"/>
</target>

</project>
3 changes: 3 additions & 0 deletions org.jacoco.ant.test/src/org/jacoco/ant/data/policy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
grant codeBase "file:${jacoco.location}" {
permission java.security.AllPermission;
};

0 comments on commit 5522e1d

Please sign in to comment.