1.1 --- a/make/build.xml Wed Jun 11 17:41:52 2014 +0530 1.2 +++ b/make/build.xml Mon Jun 16 08:55:58 2014 +0530 1.3 @@ -351,35 +351,32 @@ 1.4 <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/> 1.5 </target> 1.6 1.7 - <target name="test" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> 1.8 - <fileset id="test.classes" dir="${build.test.classes.dir}"> 1.9 - <include name="**/api/javaaccess/*Test.class"/> 1.10 - <include name="**/api/scripting/*Test.class"/> 1.11 - <include name="**/codegen/*Test.class"/> 1.12 - <include name="**/parser/*Test.class"/> 1.13 - <include name="**/runtime/*Test.class"/> 1.14 - <include name="**/runtime/regexp/*Test.class"/> 1.15 - <include name="**/runtime/regexp/joni/*Test.class"/> 1.16 - <include name="**/framework/*Test.class"/> 1.17 - </fileset> 1.18 + <!-- only to be invoked as dependency of "test" target --> 1.19 + <target name="-test-classes-all" depends="jar" unless="test.class"> 1.20 + <fileset id="test.classes" dir="${build.test.classes.dir}"> 1.21 + <include name="**/api/javaaccess/*Test.class"/> 1.22 + <include name="**/api/scripting/*Test.class"/> 1.23 + <include name="**/codegen/*Test.class"/> 1.24 + <include name="**/parser/*Test.class"/> 1.25 + <include name="**/runtime/*Test.class"/> 1.26 + <include name="**/runtime/regexp/*Test.class"/> 1.27 + <include name="**/runtime/regexp/joni/*Test.class"/> 1.28 + <include name="**/framework/*Test.class"/> 1.29 + </fileset> 1.30 + </target> 1.31 1.32 + <!-- only to be invoked as dependency of "test" target --> 1.33 + <target name="-test-classes-single" depends="jar" if="test.class"> 1.34 + <fileset id="test.classes" dir="${build.test.classes.dir}"> 1.35 + <include name="${test.class}*"/> 1.36 + </fileset> 1.37 + </target> 1.38 + 1.39 + <!-- only to be invoked as dependency of "test" target --> 1.40 + <target name="-test-nosecurity" unless="test.class"> 1.41 <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}"> 1.42 <include name="**/framework/ScriptTest.class"/> 1.43 </fileset> 1.44 - 1.45 - <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" 1.46 - verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> 1.47 - <jvmarg line="${ext.class.path}"/> 1.48 - <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> 1.49 - <propertyset> 1.50 - <propertyref prefix="test-sys-prop."/> 1.51 - <mapper from="test-sys-prop.*" to="*" type="glob"/> 1.52 - </propertyset> 1.53 - <sysproperty key="test.js.excludes.file" value="${exclude.list}"/> 1.54 - <classpath> 1.55 - <pathelement path="${run.test.classpath}"/> 1.56 - </classpath> 1.57 - </testng> 1.58 <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes" 1.59 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> 1.60 <jvmarg line="${ext.class.path}"/> 1.61 @@ -397,6 +394,28 @@ 1.62 </testng> 1.63 </target> 1.64 1.65 + <!-- only to be invoked as dependency of "test" target --> 1.66 + <target name="-test-security"> 1.67 + <delete dir="${build.dir}/nashorn_code_cache"/> 1.68 + <property name="debug.test.jvmargs" value=""/> 1.69 + <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" 1.70 + verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> 1.71 + <jvmarg line="${ext.class.path}"/> 1.72 + <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> 1.73 + <jvmarg line="${debug.test.jvmargs}"/> 1.74 + <propertyset> 1.75 + <propertyref prefix="test-sys-prop."/> 1.76 + <mapper from="test-sys-prop.*" to="*" type="glob"/> 1.77 + </propertyset> 1.78 + <sysproperty key="test.js.excludes.file" value="${exclude.list}"/> 1.79 + <classpath> 1.80 + <pathelement path="${run.test.classpath}"/> 1.81 + </classpath> 1.82 + </testng> 1.83 + </target> 1.84 + 1.85 + <target name="test" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file, -test-security, -test-nosecurity" if="testng.available"/> 1.86 + 1.87 <target name="test-basicparallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file"> 1.88 <!-- use just build.test.classes.dir to avoid referring to TestNG --> 1.89 <java classname="${parallel.test.runner}" dir="${basedir}" classpath="${build.test.classes.dir}" failonerror="true" fork="true">