< prev index next >

make/build.xml

Print this page

        

@@ -392,10 +392,22 @@
       <fileset dir="${build.test.classes.dir}" includes="**/UnnamedPackage**"/>
     </jar>
 
   </target>
 
+  <target name="generate-security-config" depends="generate-policy-file, generate-security-properties-file"/>
+
+  <target name="generate-security-properties-file" depends="prepare">
+    <echo file="${build.dir}/nashorn.security.properties">
+
+package.access=sun.misc.,\
+    sun.reflect.,\
+    jdk.nashorn.internal.
+
+    </echo>
+  </target>
+
   <target name="generate-policy-file" depends="prepare">
     <echo file="${build.dir}/nashorn.policy">
 
 grant codeBase "file:/${basedir}/${dynalink.module.classes.dir}" {
     permission java.security.AllPermission;

@@ -598,11 +610,11 @@
     </testng>
   </target>
 
   <target name="test" depends="prepare, javadoc, test-pessimistic, test-optimistic"/>
 
-  <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
     <echo message="Running test suite in OPTIMISTIC mode..."/>
     <antcall target="-test-nosecurity" inheritRefs="true">
       <param name="optimistic" value="true"/>
       <param name="testResultsSubDir" value="optimistic"/>
     </antcall>

@@ -610,11 +622,11 @@
       <param name="optimistic" value="true"/>
       <param name="testResultsSubDir" value="optimistic"/>
     </antcall>
   </target>
 
-  <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
     <echo message="Running test suite in PESSIMISTIC mode..."/>
     <antcall target="-test-nosecurity" inheritRefs="true">
       <param name="optimistic" value="false"/>
       <param name="testResultsSubDir" value="pessimistic"/>
     </antcall>

@@ -653,11 +665,11 @@
           <pathelement path="${testjfx.run.test.classpath}"/>
       </classpath>
     </testng>
   </target>
 
-  <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
     </fileset>
 
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"

@@ -671,11 +683,11 @@
           <pathelement path="${run.test.classpath}"/>
       </classpath>
     </testng>
   </target>
 
-  <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
     </fileset>
 
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"

@@ -694,11 +706,11 @@
     </testng>
   </target>
 
   <target name="test262parallel" depends="test262-parallel"/>
 
-  <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
     <!-- use just build.test.classes.dir to avoid referring to TestNG -->
     <java classname="${parallel.test.runner}" dir="${basedir}" fork="true" failonerror="true">
       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <!-- avoid too many typeinfo cache files. Each script is run only once anyway -->
       <jvmarg line="-Dnashorn.typeInfo.disabled=true"/>

@@ -712,11 +724,11 @@
     </java>
   </target>
 
   <target name="testparallel" depends="test-parallel"/>
 
-  <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
       <!-- use just build.test.classes.dir to avoid referring to TestNG -->
       <java classname="${parallel.test.runner}" dir="${basedir}"
         failonerror="true"
         fork="true">
       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
< prev index next >