nashorn/make/build.xml
changeset 24769 de4dcfa9380f
parent 24768 ae21f28f0ddc
parent 24586 601c81b4165d
child 24770 17f8e3b82ad3
--- a/nashorn/make/build.xml	Wed May 28 13:58:46 2014 +0200
+++ b/nashorn/make/build.xml	Wed May 28 16:53:43 2014 +0200
@@ -42,6 +42,9 @@
     <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
       <available file="/usr/local/bin/hg"/>
     </condition>
+    <condition property="git.executable" value="/usr/local/bin/git" else="git">
+      <available file="/usr/local/bin/git"/>
+    </condition>
     <!-- check if JDK already has ASM classes -->
     <available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/>
     <!-- check if testng.jar is avaiable -->
@@ -355,8 +358,30 @@
       <include name="**/runtime/regexp/*Test.class"/>
       <include name="**/runtime/regexp/joni/*Test.class"/>
       <include name="**/framework/*Test.class"/>
+      <exclude name="jdk/nashorn/internal/runtime/CodeStoreAndPathTest.class"/>
     </fileset>
 
+    <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
+      <include name="**/framework/ScriptTest.class"/>
+    </fileset>
+
+    <fileset id="test.nooptimistic.classes" dir="${build.test.classes.dir}">
+      <include name="jdk/nashorn/internal/runtime/CodeStoreAndPathTest.class"/>
+    </fileset>
+
+    <testng outputdir="${build.nooptimistic.test.results.dir}" classfilesetref="test.nooptimistic.classes"
+       verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
+      <jvmarg line="${ext.class.path}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <sysproperty key="nashorn.optimistic" value="false"/>
+      <propertyset>
+        <propertyref prefix="nashorn."/>
+      </propertyset>
+      <classpath>
+          <pathelement path="${run.test.classpath}"/>
+      </classpath>
+    </testng>
+
     <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}"/>
@@ -373,6 +398,22 @@
           <pathelement path="${run.test.classpath}"/>
       </classpath>
     </testng>
+
+    <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes"
+       verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
+      <jvmarg line="${ext.class.path}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+      <propertyset>
+        <propertyref prefix="nashorn."/>
+      </propertyset>
+      <propertyset>
+        <propertyref prefix="test-sys-prop-no-security."/>
+        <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
+      </propertyset>
+      <classpath>
+          <pathelement path="${run.test.classpath}"/>
+      </classpath>
+    </testng>
   </target>
 
   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
@@ -515,18 +556,17 @@
 
   <!-- test262 test suite -->
   <target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}">
-    <!-- clone test262 mercurial repo -->
-    <exec executable="${hg.executable}">
+    <!-- clone test262 git repo -->
+    <exec executable="${git.executable}">
        <arg value="clone"/>
-       <arg value="http://hg.ecmascript.org/tests/test262"/>
+       <arg value="https://github.com/tc39/test262"/>
        <arg value="${test.external.dir}/test262"/>
     </exec>
   </target>
   <target name="update-test262" depends="init" if="${test-sys-prop.external.test262}">
-    <!-- update test262 mercurial repo -->
-    <exec executable="${hg.executable}" dir="${test.external.dir}/test262">
+    <!-- update test262 git repo -->
+    <exec executable="${git.executable}" dir="${test.external.dir}/test262">
        <arg value="pull"/>
-       <arg value="-u"/>
     </exec>
   </target>