-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle is unable to execute some tests #19
Comments
For reference, the problematic tests in the
The |
It looks like if Gradle already put a security manager which is not giving the permission to set EchoSVG's manager: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.security.policy" "write")
at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.base/java.security.AccessController.checkPermission(AccessController.java:1036)
at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:408)
at java.base/java.lang.System.setProperty(System.java:911)
at io.sf.carte.echosvg.util.ApplicationSecurityEnforcer.installSecurityManager(ApplicationSecurityEnforcer.java:247)
at io.sf.carte.echosvg.util.ApplicationSecurityEnforcer.enforceSecurity(ApplicationSecurityEnforcer.java:165)
at io.sf.carte.echosvg.test.svg.SVGOnLoadExceptionTest$1.run(SVGOnLoadExceptionTest.java:298)
at io.sf.carte.echosvg.test.svg.SVGOnLoadExceptionTest$1.run(SVGOnLoadExceptionTest.java:295)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at io.sf.carte.echosvg.test.svg.SVGOnLoadExceptionTest.runTest(SVGOnLoadExceptionTest.java:295)
at io.sf.carte.echosvg.bridge.EcmaNoLoadTest.test(EcmaNoLoadTest.java:73) See also:
And in Gradle's Testing in Java & JVM projects:
However, the |
This could be fixed by adding the "-scriptSecurityOff" command line option to the test executions. Apparently gradle is bit too invasive when doing tests. If I may ask: why are you converting batik to gradle? Their maven build is largely working. |
That was issue #8. It was triggered by the fact that Maven is too tied to the Maven Central repository, which I do not submit my artifacts to. It is also easier to write small tasks to, for example, generate the test scripting jar files and copy them to a certain directory. With Batik, one had to run the old script-based build to generate those jar files. |
Interesting. I'm not using any artifacts outside of central. :) |
The |
I'm keeping things as they are now (with those tests excluded in Gradle) and close this issue:
|
Gradle was executing the tests just fine until I added tests that use a
SecurityManager
. Now, when I attempt to run the test suite with Gradle I get the following:I tried to give full permissions to the
.gradle
directory in the security policies, but that does not help. And settingjava.security.debug=access,failure
yields nothing. Perhaps the problem is not related to security permissions at all.Meanwhile, I successfully execute the test suite with the Eclipse IDE.
The text was updated successfully, but these errors were encountered: