make/build.xml

Print this page




 346     <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace>    <!--hack for Windows - to make URLs with normal path separators -->
 347     <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace>   <!--hack for Unix - to avoid leading // in URLs -->
 348 
 349   </target>
 350 
 351   <target name="check-external-tests">
 352       <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/>
 353       <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/>
 354       <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/>
 355       <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/>
 356       <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
 357       <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
 358       <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/>
 359       <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/>
 360   </target>
 361 
 362   <target name="check-testng" unless="testng.available">
 363     <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/>
 364   </target>
 365 
 366   <target name="test" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
 367     <delete dir="${build.dir}/nashorn_code_cache"/>
 368     <fileset id="test.classes" dir="${build.test.classes.dir}">
 369       <include name="**/api/javaaccess/*Test.class"/>
 370       <include name="**/api/scripting/*Test.class"/>
 371       <include name="**/codegen/*Test.class"/>
 372       <include name="**/parser/*Test.class"/>
 373       <include name="**/runtime/*Test.class"/>
 374       <include name="**/runtime/regexp/*Test.class"/>
 375       <include name="**/runtime/regexp/joni/*Test.class"/>
 376       <include name="**/framework/*Test.class"/>
 377     </fileset>

 378 









 379     <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
 380       <include name="**/framework/ScriptTest.class"/>
 381     </fileset>
 382 
 383     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
 384        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 385       <jvmarg line="${ext.class.path}"/>
 386       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
 387       <propertyset>
 388         <propertyref prefix="nashorn."/>
 389       </propertyset>
 390       <propertyset>
 391         <propertyref prefix="test-sys-prop."/>
 392         <mapper from="test-sys-prop.*" to="*" type="glob"/>
 393       </propertyset>
 394       <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
 395       <classpath>
 396           <pathelement path="${run.test.classpath}"/>
 397       </classpath>
 398     </testng>

 399 
 400     <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes"




 401        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 402       <jvmarg line="${ext.class.path}"/>
 403       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>

 404       <propertyset>
 405         <propertyref prefix="nashorn."/>
 406       </propertyset>
 407       <propertyset>
 408         <propertyref prefix="test-sys-prop-no-security."/>
 409         <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
 410       </propertyset>

 411       <classpath>
 412           <pathelement path="${run.test.classpath}"/>
 413       </classpath>
 414     </testng>
 415   </target>


 416 
 417   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
 418     <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."/>
 419   </target>
 420 
 421   <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
 422     <fileset id="test.classes" dir="${build.test.classes.dir}">
 423        <include name="**/framework/*Test.class"/>
 424     </fileset>
 425 
 426     <copy file="${file.reference.jfxrt.jar}" todir="dist"/>
 427 
 428     <condition property="jfx.prism.order" value="-Dprism.order=j2d" else=" ">
 429         <not>
 430             <os family="mac"/>
 431         </not>
 432     </condition>
 433 
 434     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
 435        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">




 346     <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace>    <!--hack for Windows - to make URLs with normal path separators -->
 347     <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace>   <!--hack for Unix - to avoid leading // in URLs -->
 348 
 349   </target>
 350 
 351   <target name="check-external-tests">
 352       <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/>
 353       <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/>
 354       <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/>
 355       <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/>
 356       <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
 357       <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
 358       <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/>
 359       <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/>
 360   </target>
 361 
 362   <target name="check-testng" unless="testng.available">
 363     <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/>
 364   </target>
 365 
 366   <!-- only to be invoked as dependency of "test" target -->
 367   <target name="-test-classes-all" depends="jar" unless="test.class">
 368       <fileset id="test.classes" dir="${build.test.classes.dir}">
 369           <include name="**/api/javaaccess/*Test.class"/>
 370           <include name="**/api/scripting/*Test.class"/>
 371           <include name="**/codegen/*Test.class"/>
 372           <include name="**/parser/*Test.class"/>
 373           <include name="**/runtime/*Test.class"/>
 374           <include name="**/runtime/regexp/*Test.class"/>
 375           <include name="**/runtime/regexp/joni/*Test.class"/>
 376           <include name="**/framework/*Test.class"/>
 377      </fileset>
 378   </target>
 379 
 380   <!-- only to be invoked as dependency of "test" target -->
 381   <target name="-test-classes-single" depends="jar" if="test.class">
 382      <fileset id="test.classes" dir="${build.test.classes.dir}">
 383          <include name="${test.class}*"/>
 384      </fileset>
 385   </target>
 386 
 387   <!-- only to be invoked as dependency of "test" target -->
 388   <target name="-test-nosecurity" unless="test.class">
 389     <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
 390       <include name="**/framework/ScriptTest.class"/>
 391     </fileset>
 392     <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes"

 393        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 394       <jvmarg line="${ext.class.path}"/>
 395       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
 396       <propertyset>
 397         <propertyref prefix="nashorn."/>
 398       </propertyset>
 399       <propertyset>
 400         <propertyref prefix="test-sys-prop-no-security."/>
 401         <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
 402       </propertyset>

 403       <classpath>
 404           <pathelement path="${run.test.classpath}"/>
 405       </classpath>
 406     </testng>
 407   </target>
 408 
 409   <!-- only to be invoked as dependency of "test" target -->
 410   <target name="-test-security">
 411     <delete dir="${build.dir}/nashorn_code_cache"/>
 412     <property name="debug.test.jvmargs" value=""/>
 413     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
 414        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 415       <jvmarg line="${ext.class.path}"/>
 416       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
 417       <jvmarg line="${debug.test.jvmargs}"/>
 418       <propertyset>
 419         <propertyref prefix="nashorn."/>
 420       </propertyset>
 421       <propertyset>
 422         <propertyref prefix="test-sys-prop."/>
 423         <mapper from="test-sys-prop.*" to="*" type="glob"/>
 424       </propertyset>
 425       <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
 426       <classpath>
 427           <pathelement path="${run.test.classpath}"/>
 428       </classpath>
 429     </testng>
 430   </target>
 431 
 432   <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"/>
 433 
 434   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
 435     <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."/>
 436   </target>
 437 
 438   <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
 439     <fileset id="test.classes" dir="${build.test.classes.dir}">
 440        <include name="**/framework/*Test.class"/>
 441     </fileset>
 442 
 443     <copy file="${file.reference.jfxrt.jar}" todir="dist"/>
 444 
 445     <condition property="jfx.prism.order" value="-Dprism.order=j2d" else=" ">
 446         <not>
 447             <os family="mac"/>
 448         </not>
 449     </condition>
 450 
 451     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
 452        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">