8008193: test262 tests should be run with security manager enabled
authorsundar
Thu, 14 Feb 2013 09:14:31 +0530
changeset 16231 9c8790061bee
parent 16230 c38c724d82e7
child 16232 efd57dd90de6
8008193: test262 tests should be run with security manager enabled Reviewed-by: jlaskey
nashorn/make/build.xml
--- a/nashorn/make/build.xml	Wed Feb 13 19:59:30 2013 +0530
+++ b/nashorn/make/build.xml	Thu Feb 14 09:14:31 2013 +0530
@@ -317,7 +317,7 @@
       </java>
   </target>
 
-  <target name="test262" depends="jar, check-testng, check-external-tests, compile-test" if="testng.available">
+  <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
     </fileset>
@@ -325,7 +325,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs}"/>
+      <jvmarg line="${run.test.jvmargs} ${run.test.jvmsecurityargs}"/>
       <propertyset>
         <propertyref prefix="test262-test-sys-prop."/>
         <mapper from="test262-test-sys-prop.*" to="*" type="glob"/>
@@ -338,11 +338,14 @@
 
   <target name="test262parallel" depends="test262-parallel"/>
 
-  <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test" if="testng.available">
+  <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <!-- use just build.test.classes.dir to avoid referring to TestNG -->
-    <java classname="${parallel.test.runner}" dir="${basedir}" classpath="${build.test.classes.dir}" fork="true">
+    <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs}"/>
+      <jvmarg line="${run.test.jvmargs} ${run.test.jvmsecurityargs}"/>
+      <classpath>
+          <pathelement path="${run.test.classpath}"/>
+      </classpath>
       <syspropertyset>
           <propertyref prefix="test262-test-sys-prop."/>
           <mapper type="glob" from="test262-test-sys-prop.*" to="*"/>