nashorn/make/build.xml
changeset 26982 ff5dd57a40f2
parent 26377 028dad61662f
child 27101 b8fffc2f66a3
equal deleted inserted replaced
26981:1576872e7046 26982:ff5dd57a40f2
    76 
    76 
    77     <condition property="jfr.options" value="${run.test.jvmargs.jfr}" else="">
    77     <condition property="jfr.options" value="${run.test.jvmargs.jfr}" else="">
    78       <istrue value="${jfr}"/>
    78       <istrue value="${jfr}"/>
    79     </condition>
    79     </condition>
    80   </target>
    80   </target>
    81 
    81   
    82   <target name="init" depends="init-conditions, init-cc">
    82   <target name="init" depends="init-conditions, init-cc">
    83     <!-- extends jvm args -->
    83     <!-- extends jvm args -->
    84     <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
    84     <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
    85     <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
    85     <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
    86 
    86 
   418       </propertyset>
   418       </propertyset>
   419       <propertyset>
   419       <propertyset>
   420         <propertyref prefix="test-sys-prop-no-security."/>
   420         <propertyref prefix="test-sys-prop-no-security."/>
   421         <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
   421         <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
   422       </propertyset>
   422       </propertyset>
       
   423       <sysproperty key="optimistic.override" value="${optimistic}"/>
   423       <classpath>
   424       <classpath>
   424           <pathelement path="${run.test.classpath}"/>
   425           <pathelement path="${run.test.classpath}"/>
   425       </classpath>
   426       </classpath>
   426     </testng>
   427     </testng>
   427   </target>
   428   </target>
   429   <!-- only to be invoked as dependency of "test" target -->
   430   <!-- only to be invoked as dependency of "test" target -->
   430   <target name="-test-security">
   431   <target name="-test-security">
   431     <delete dir="${build.dir}/nashorn_code_cache"/>
   432     <delete dir="${build.dir}/nashorn_code_cache"/>
   432     <property name="debug.test.jvmargs" value=""/>
   433     <property name="debug.test.jvmargs" value=""/>
   433     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
   434     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
   434        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
   435 	    verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
   435       <jvmarg line="${ext.class.path}"/>
   436       <jvmarg line="${ext.class.path}"/>
   436       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
   437       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
   437       <jvmarg line="${debug.test.jvmargs}"/>
   438       <jvmarg line="${debug.test.jvmargs}"/>
   438       <propertyset>
   439       <propertyset>
   439         <propertyref prefix="nashorn."/>
   440         <propertyref prefix="nashorn."/>
   440       </propertyset>
   441       </propertyset>
   441       <propertyset>
   442       <propertyset>
   442         <propertyref prefix="test-sys-prop."/>
   443         <propertyref prefix="test-sys-prop."/>
   443         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   444         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   444       </propertyset>
   445       </propertyset>
       
   446       <sysproperty key="optimistic.override" value="${optimistic}"/>
   445       <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
   447       <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
   446       <classpath>
   448       <classpath>
   447           <pathelement path="${run.test.classpath}"/>
   449           <pathelement path="${run.test.classpath}"/>
   448       </classpath>
   450       </classpath>
   449     </testng>
   451     </testng>
   450   </target>
   452   </target>
   451 
   453 
   452   <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"/>
   454   <target name="test" depends="test-pessimistic, test-optimistic"/>
       
   455 
       
   456   <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">
       
   457     <echo message="Running test suite in OPTIMISTIC mode..."/>
       
   458     <antcall target="-test-nosecurity" inheritRefs="true">
       
   459       <param name="optimistic" value="true"/>
       
   460     </antcall>    
       
   461     <antcall target="-test-security" inheritRefs="true">
       
   462       <param name="optimistic" value="true"/>
       
   463     </antcall>
       
   464   </target>
       
   465 
       
   466   <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">
       
   467     <echo message="Running test suite in PESSIMISTIC mode..."/>
       
   468     <antcall target="-test-nosecurity" inheritRefs="true">
       
   469       <param name="optimistic" value="false"/>
       
   470     </antcall>    
       
   471     <antcall target="-test-security" inheritRefs="true">
       
   472       <param name="optimistic" value="false"/>
       
   473     </antcall>
       
   474   </target>
   453 
   475 
   454   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
   476   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
   455     <echo message="WARNING: Jemmy or JavaFX or TestNG not available, will not run tests. Please copy testng.jar, JemmyCore.jar, JemmyFX.jar, JemmyAWTInput.jar under test${file.separator}lib directory. And make sure you have jfxrt.jar in ${java.home}${file.separator}lib${file.separator}ext dir."/>
   477     <echo message="WARNING: Jemmy or JavaFX or TestNG not available, will not run tests. Please copy testng.jar, JemmyCore.jar, JemmyFX.jar, JemmyAWTInput.jar under test${file.separator}lib directory. And make sure you have jfxrt.jar in ${java.home}${file.separator}lib${file.separator}ext dir."/>
   456   </target>
   478   </target>
   457 
   479