make/build.xml

Print this page




 334 
 335     <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace>    <!--hack for Windows - to make URLs with normal path separators -->
 336     <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace>   <!--hack for Unix - to avoid leading // in URLs -->
 337 
 338   </target>
 339 
 340   <target name="check-external-tests">
 341       <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/>
 342       <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/>
 343       <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/>
 344       <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/>
 345       <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
 346       <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
 347       <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/>
 348   </target>
 349 
 350   <target name="check-testng" unless="testng.available">
 351     <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/>
 352   </target>
 353 
 354   <target name="test" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">

 355     <fileset id="test.classes" dir="${build.test.classes.dir}">
 356       <include name="**/api/javaaccess/*Test.class"/>
 357       <include name="**/api/scripting/*Test.class"/>
 358       <include name="**/codegen/*Test.class"/>
 359       <include name="**/parser/*Test.class"/>
 360       <include name="**/runtime/*Test.class"/>
 361       <include name="**/runtime/regexp/*Test.class"/>
 362       <include name="**/runtime/regexp/joni/*Test.class"/>
 363       <include name="**/framework/*Test.class"/>
 364     </fileset>








 365 


 366     <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
 367       <include name="**/framework/ScriptTest.class"/>
 368     </fileset>
 369 
 370     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
 371        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 372       <jvmarg line="${ext.class.path}"/>
 373       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
 374       <propertyset>
 375         <propertyref prefix="test-sys-prop."/>
 376         <mapper from="test-sys-prop.*" to="*" type="glob"/>



 377       </propertyset>
 378       <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
 379       <classpath>
 380           <pathelement path="${run.test.classpath}"/>
 381       </classpath>
 382     </testng>
 383     <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.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}"/>
 387       <propertyset>
 388         <propertyref prefix="nashorn."/>
 389       </propertyset>
 390       <propertyset>
 391         <propertyref prefix="test-sys-prop-no-security."/>
 392         <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
 393       </propertyset>

 394       <classpath>
 395           <pathelement path="${run.test.classpath}"/>
 396       </classpath>
 397     </testng>
 398   </target>


 399 
 400   <target name="test-basicparallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file">
 401       <!-- use just build.test.classes.dir to avoid referring to TestNG -->
 402       <java classname="${parallel.test.runner}" dir="${basedir}" classpath="${build.test.classes.dir}" failonerror="true" fork="true">
 403       <jvmarg line="${ext.class.path}"/>
 404       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
 405       <syspropertyset>
 406           <propertyref prefix="test-sys-prop."/>
 407           <mapper type="glob" from="test-sys-prop.*" to="*"/>
 408       </syspropertyset>
 409       </java>
 410   </target>
 411 
 412   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
 413     <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."/>
 414   </target>
 415 
 416   <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
 417     <fileset id="test.classes" dir="${build.test.classes.dir}">
 418        <include name="**/framework/*Test.class"/>




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

 381        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 382       <jvmarg line="${ext.class.path}"/>
 383       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
 384       <propertyset>
 385         <propertyref prefix="nashorn."/>
 386       </propertyset>
 387       <propertyset>
 388         <propertyref prefix="test-sys-prop-no-security."/>
 389         <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
 390       </propertyset>

 391       <classpath>
 392           <pathelement path="${run.test.classpath}"/>
 393       </classpath>
 394     </testng>
 395   </target>
 396 
 397   <!-- only to be invoked as dependency of "test" target -->
 398   <target name="-test-security">
 399     <delete dir="${build.dir}/nashorn_code_cache"/>
 400     <property name="debug.test.jvmargs" value=""/>
 401     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
 402        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
 403       <jvmarg line="${ext.class.path}"/>
 404       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
 405       <jvmarg line="${debug.test.jvmargs}"/>


 406       <propertyset>
 407         <propertyref prefix="test-sys-prop."/>
 408         <mapper from="test-sys-prop.*" to="*" type="glob"/>
 409       </propertyset>
 410       <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
 411       <classpath>
 412           <pathelement path="${run.test.classpath}"/>
 413       </classpath>
 414     </testng>
 415   </target>
 416 
 417   <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"/>
 418 
 419   <target name="test-basicparallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file">
 420       <!-- use just build.test.classes.dir to avoid referring to TestNG -->
 421       <java classname="${parallel.test.runner}" dir="${basedir}" classpath="${build.test.classes.dir}" failonerror="true" fork="true">
 422       <jvmarg line="${ext.class.path}"/>
 423       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
 424       <syspropertyset>
 425           <propertyref prefix="test-sys-prop."/>
 426           <mapper type="glob" from="test-sys-prop.*" to="*"/>
 427       </syspropertyset>
 428       </java>
 429   </target>
 430 
 431   <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
 432     <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."/>
 433   </target>
 434 
 435   <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
 436     <fileset id="test.classes" dir="${build.test.classes.dir}">
 437        <include name="**/framework/*Test.class"/>