475 476 grant codeBase "file:/${basedir}/test/script/basic/es6/*" { 477 permission java.io.FilePermission "${basedir}/test/script/-", "read"; 478 permission java.io.FilePermission "$${user.dir}", "read"; 479 permission java.util.PropertyPermission "user.dir", "read"; 480 permission java.util.PropertyPermission "nashorn.test.*", "read"; 481 }; 482 483 grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" { 484 permission java.util.PropertyPermission "java.security.policy", "read"; 485 }; 486 487 grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { 488 permission java.lang.RuntimePermission "nashorn.JavaReflection"; 489 }; 490 491 grant codeBase "file:/${basedir}/test/script/markdown.js" { 492 permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read"; 493 }; 494 495 </echo> 496 497 <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators --> 498 <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs --> 499 500 </target> 501 502 <target name="check-external-tests"> 503 <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/> 504 <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/> 505 <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/> 506 <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/> 507 <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/> 508 <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/> 509 <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/> 510 <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/> 511 </target> 512 513 <target name="check-testng" unless="testng.available"> 514 <echo message="WARNING: TestNG not available, will not run tests. Please copy TestNG and dependency JARs to the ${test.lib} directory."/> | 475 476 grant codeBase "file:/${basedir}/test/script/basic/es6/*" { 477 permission java.io.FilePermission "${basedir}/test/script/-", "read"; 478 permission java.io.FilePermission "$${user.dir}", "read"; 479 permission java.util.PropertyPermission "user.dir", "read"; 480 permission java.util.PropertyPermission "nashorn.test.*", "read"; 481 }; 482 483 grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" { 484 permission java.util.PropertyPermission "java.security.policy", "read"; 485 }; 486 487 grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { 488 permission java.lang.RuntimePermission "nashorn.JavaReflection"; 489 }; 490 491 grant codeBase "file:/${basedir}/test/script/markdown.js" { 492 permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read"; 493 }; 494 495 grant codeBase "file:/${basedir}/test/script/basic/JDK-8158467.js" { 496 permission java.lang.RuntimePermission "nashorn.setConfig"; 497 }; 498 499 </echo> 500 501 <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators --> 502 <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs --> 503 504 </target> 505 506 <target name="check-external-tests"> 507 <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/> 508 <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/> 509 <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/> 510 <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/> 511 <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/> 512 <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/> 513 <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/> 514 <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/> 515 </target> 516 517 <target name="check-testng" unless="testng.available"> 518 <echo message="WARNING: TestNG not available, will not run tests. Please copy TestNG and dependency JARs to the ${test.lib} directory."/> |