annotate make/build.xml @ 1546:77646e19bd81

Merge
author iris
date Tue, 25 Aug 2015 14:45:32 -0700
parents 7cbb2b5867fd d46483bac1f6
children 70f3415f2adf
rev   line source
jlaskey@2 1 <?xml version="1.0" encoding="UTF-8"?>
lagergren@866 2
jlaskey@2 3 <!--
mhaupt@1300 4 Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
jlaskey@2 5 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jlaskey@2 6
jlaskey@2 7 This code is free software; you can redistribute it and/or modify it
jlaskey@2 8 under the terms of the GNU General Public License version 2 only, as
jlaskey@2 9 published by the Free Software Foundation.
jlaskey@2 10
jlaskey@2 11 This code is distributed in the hope that it will be useful, but WITHOUT
jlaskey@2 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jlaskey@2 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jlaskey@2 14 version 2 for more details (a copy is included in the LICENSE file that
jlaskey@2 15 accompanied this code).
jlaskey@2 16
jlaskey@2 17 You should have received a copy of the GNU General Public License version
jlaskey@2 18 2 along with this work; if not, write to the Free Software Foundation,
jlaskey@2 19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jlaskey@2 20
jlaskey@2 21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jlaskey@2 22 or visit www.oracle.com if you need additional information or have any
jlaskey@2 23 questions.
jlaskey@2 24 -->
lagergren@866 25
sundar@125 26 <project name="nashorn" default="test" basedir="..">
jlaskey@2 27 <import file="build-nasgen.xml"/>
lagergren@110 28 <import file="code_coverage.xml"/>
jlaskey@2 29
lagergren@110 30 <target name="init-conditions">
lagergren@110 31 <!-- loading locally defined resources and properties. NB they owerwrite default ones defined later -->
lagergren@110 32 <property file="${user.home}/.nashorn.project.local.properties"/>
lagergren@110 33
jlaskey@2 34 <loadproperties srcFile="make/project.properties"/>
yan@978 35 <path id="dist.path">
yan@978 36 <pathelement location="${dist.dir}"/>
yan@978 37 </path>
chegar@1123 38 <path id="nashorn.boot.prefix.path">
sundar@1125 39 <pathelement location="${dist.jar}"/>
jlaskey@2 40 </path>
sundar@1129 41 <property name="boot.class.path" value="-Xbootclasspath/p:${toString:nashorn.boot.prefix.path}"/>
sundar@18 42 <condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
sundar@18 43 <available file="/usr/local/bin/svn"/>
sundar@18 44 </condition>
sundar@18 45 <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
sundar@18 46 <available file="/usr/local/bin/hg"/>
sundar@18 47 </condition>
sundar@774 48 <condition property="git.executable" value="/usr/local/bin/git" else="git">
sundar@774 49 <available file="/usr/local/bin/git"/>
sundar@774 50 </condition>
mhaupt@1360 51 <!-- check if testng.jar is avaiable, and download it if it isn't -->
mhaupt@1360 52 <available property="testng.already.present" file="${file.reference.testng.jar}"/>
mhaupt@1360 53 <antcall target="get-testng"/>
sundar@25 54 <available property="testng.available" file="${file.reference.testng.jar}"/>
kshefov@637 55 <!-- check if Jemmy ang testng.jar are avaiable -->
kshefov@637 56 <condition property="jemmy.jfx.testng.available" value="true">
lagergren@866 57 <and>
kshefov@637 58 <available file="${file.reference.jemmyfx.jar}"/>
kshefov@637 59 <available file="${file.reference.jemmycore.jar}"/>
kshefov@637 60 <available file="${file.reference.jemmyawtinput.jar}"/>
kshefov@637 61 <available file="${file.reference.jfxrt.jar}"/>
kshefov@637 62 <isset property="testng.available"/>
kshefov@637 63 </and>
kshefov@637 64 </condition>
lagergren@110 65
hannesw@473 66 <!-- enable/disable make code coverage -->
hannesw@473 67 <condition property="cc.enabled">
hannesw@473 68 <istrue value="${make.code.coverage}" />
hannesw@473 69 </condition>
jlaskey@452 70
jlaskey@452 71 <!-- exclude tests in exclude lists -->
jlaskey@452 72 <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt">
jlaskey@452 73 <istrue value="${make.code.coverage}" />
jlaskey@452 74 </condition>
sundar@690 75
sundar@690 76 <condition property="jfr.options" value="${run.test.jvmargs.jfr}" else="">
sundar@690 77 <istrue value="${jfr}"/>
sundar@690 78 </condition>
lagergren@110 79 </target>
sundar@1068 80
sundar@1068 81 <!-- check minimum ant version required to be 1.8.4 -->
sundar@1068 82 <target name="check-ant-version">
sundar@1068 83 <property name="ant.version.required" value="1.8.4"/>
sundar@1068 84 <antversion property="ant.current.version" />
sundar@1068 85 <fail message="The current ant version, ${ant.current.version}, is too old. Please use 1.8.4 or above.">
sundar@1068 86 <condition>
sundar@1068 87 <not>
sundar@1068 88 <antversion atleast="${ant.version.required}"/>
sundar@1068 89 </not>
sundar@1068 90 </condition>
sundar@1068 91 </fail>
sundar@1068 92 </target>
sundar@1068 93
sundar@1068 94 <target name="check-java-version">
sundar@1068 95 <!-- look for a Class that is available only in jdk1.8 or above -->
sundar@1068 96 <!-- core/exposed API class is better than an implementation class -->
sundar@1068 97 <available property="jdk1.8+" classname="java.util.stream.Stream"/>
sundar@1068 98
sundar@1068 99 <!-- need jdk1.8 or above -->
sundar@1068 100 <fail message="Unsupported Java version: ${ant.java.version}. Please use Java version 1.8 or greater." unless="jdk1.8+">
sundar@1068 101 </fail>
sundar@1068 102 </target>
sundar@1203 103
sundar@1068 104 <target name="init" depends="check-ant-version, check-java-version, init-conditions, init-cc">
hannesw@473 105 <!-- extends jvm args -->
sundar@690 106 <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
sundar@690 107 <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
lagergren@110 108
lagergren@110 109 <echo message="run.test.jvmargs=${run.test.jvmargs}"/>
lagergren@110 110 <echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/>
hannesw@561 111 <echo message="run.test.xms=${run.test.xms}"/>
hannesw@561 112 <echo message="run.test.xmx=${run.test.xmx}"/>
lagergren@110 113
jlaskey@2 114 </target>
jlaskey@2 115
jlaskey@2 116 <target name="prepare" depends="init">
jlaskey@2 117 <mkdir dir="${build.dir}"/>
jlaskey@2 118 <mkdir dir="${build.classes.dir}"/>
jlaskey@2 119 <mkdir dir="${build.classes.dir}/META-INF/services"/>
jlaskey@2 120 <mkdir dir="${build.test.classes.dir}"/>
jlaskey@2 121 <mkdir dir="${dist.dir}"/>
jlaskey@2 122 <mkdir dir="${dist.javadoc.dir}"/>
jlaskey@2 123 </target>
jlaskey@2 124
lagergren@110 125 <target name="clean" depends="init, clean-nasgen, init-cc-cleanup">
jlaskey@2 126 <delete includeemptydirs="true">
attila@89 127 <fileset dir="${build.dir}" erroronmissingdir="false"/>
jlaskey@2 128 </delete>
jlaskey@2 129 <delete dir="${dist.dir}"/>
jlaskey@2 130 </target>
jlaskey@2 131
sundar@1068 132 <target name="compile" depends="prepare" description="Compiles nashorn">
jlaskey@2 133 <javac srcdir="${src.dir}"
jlaskey@2 134 destdir="${build.classes.dir}"
jlaskey@2 135 classpath="${javac.classpath}"
jlaskey@2 136 source="${javac.source}"
jlaskey@2 137 target="${javac.target}"
jlaskey@2 138 debug="${javac.debug}"
jlaskey@2 139 encoding="${javac.encoding}"
sundar@413 140 includeantruntime="false" fork="true">
sundar@913 141 <compilerarg value="-Xlint:all"/>
jlaskey@2 142 <compilerarg value="-XDignore.symbol.file"/>
sundar@764 143 <compilerarg value="-Xdiags:verbose"/>
sundar@972 144 <compilerarg value="-parameters"/>
jlaskey@2 145 </javac>
jlaskey@2 146 <copy todir="${build.classes.dir}/META-INF/services">
jlaskey@2 147 <fileset dir="${meta.inf.dir}/services/"/>
jlaskey@2 148 </copy>
jlaskey@2 149 <copy todir="${build.classes.dir}/jdk/nashorn/api/scripting/resources">
sundar@1371 150 <fileset dir="${nashorn.module.src.dir}/jdk/nashorn/api/scripting/resources/"/>
jlaskey@2 151 </copy>
jlaskey@2 152 <copy todir="${build.classes.dir}/jdk/nashorn/internal/runtime/resources">
sundar@1371 153 <fileset dir="${nashorn.module.src.dir}/jdk/nashorn/internal/runtime/resources/"/>
jlaskey@2 154 </copy>
jlaskey@2 155 <copy todir="${build.classes.dir}/jdk/nashorn/tools/resources">
sundar@1371 156 <fileset dir="${nashorn.module.src.dir}/jdk/nashorn/tools/resources/"/>
jlaskey@2 157 </copy>
sundar@1371 158 <copy file="${nashorn.module.src.dir}/jdk/internal/dynalink/support/messages.properties" todir="${build.classes.dir}/jdk/internal/dynalink/support"/>
sundar@1371 159 <copy file="${nashorn.module.src.dir}/jdk/nashorn/internal/codegen/anchor.properties" todir="${build.classes.dir}/jdk/nashorn/internal/codegen"/>
attila@89 160
ihse@1537 161 <echo message="version_string=${nashorn.fullversion}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties"/>
jlaskey@2 162 <echo file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true">${line.separator}</echo>
ihse@1537 163 <echo message="version_short=${nashorn.version}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true"/>
jlaskey@2 164 </target>
jlaskey@2 165
jlaskey@391 166 <target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar" unless="compile.suppress.jar">
jlaskey@2 167 <jar jarfile="${dist.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
sundar@1371 168 <!--
sundar@1371 169 Exclude jjs classes from nashorn.jar to avoid desktop dependency.
sundar@1371 170 We have a test to make sure basic nashorn code has only "compact1"
sundar@1371 171 dependency - except for jjs shell code which has desktop dependency.
sundar@1371 172 -->
sundar@1371 173 <fileset dir="${build.classes.dir}">
sundar@1371 174 <exclude name="**/jdk/nashorn/tools/jjs/*"/>
sundar@1371 175 </fileset>
jlaskey@2 176 <manifest>
jlaskey@2 177 <attribute name="Archiver-Version" value="n/a"/>
jlaskey@2 178 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
jlaskey@2 179 <attribute name="Built-By" value="n/a"/>
jlaskey@2 180 <attribute name="Created-By" value="Ant jar task"/>
jlaskey@2 181 <section name="jdk/nashorn/">
jlaskey@2 182 <attribute name="Implementation-Title" value="${nashorn.product.name}"/>
jlaskey@2 183 <attribute name="Implementation-Version" value="${nashorn.version}"/>
jlaskey@2 184 </section>
jlaskey@2 185 </manifest>
jlaskey@2 186 </jar>
jlaskey@2 187 </target>
jlaskey@391 188
jlaskey@391 189 <target name="use-promoted-nashorn" depends="init">
jlaskey@391 190 <delete file="${dist.dir}/nashorn.jar"/>
jlaskey@391 191 <copy file="${java.home}/lib/ext/nashorn.jar" todir="${dist.dir}"/>
jlaskey@391 192 <property name="compile.suppress.jar" value="defined"/>
jlaskey@391 193 </target>
jlaskey@391 194
jlaskey@160 195 <target name="build-fxshell" depends="jar">
jlaskey@160 196 <description>Builds the javafx shell.</description>
jlaskey@160 197 <mkdir dir="${fxshell.classes.dir}"/>
jlaskey@160 198 <javac srcdir="${fxshell.dir}"
jlaskey@160 199 destdir="${fxshell.classes.dir}"
mhaupt@1271 200 classpath="${dist.jar}${path.separator}${javac.classpath}"
jlaskey@160 201 debug="${javac.debug}"
jlaskey@160 202 encoding="${javac.encoding}"
jlaskey@160 203 includeantruntime="false">
jlaskey@160 204 </javac>
jlaskey@160 205 <jar jarfile="${fxshell.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
jlaskey@160 206 <fileset dir="${fxshell.classes.dir}"/>
jlaskey@160 207 <manifest>
jlaskey@160 208 <attribute name="Archiver-Version" value="n/a"/>
jlaskey@160 209 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
jlaskey@160 210 <attribute name="Built-By" value="n/a"/>
jlaskey@160 211 <attribute name="Created-By" value="Ant jar task"/>
jlaskey@160 212 <section name="jdk/nashorn/">
jlaskey@160 213 <attribute name="Implementation-Title" value="Oracle Nashorn FXShell"/>
jlaskey@160 214 <attribute name="Implementation-Version" value="${nashorn.version}"/>
jlaskey@160 215 </section>
jlaskey@160 216 </manifest>
jlaskey@160 217 </jar>
jlaskey@160 218 </target>
jlaskey@2 219
mhaupt@1342 220 <!-- generate javadoc for all Nashorn and ASM classes -->
sundar@814 221 <target name="javadoc" depends="jar">
sundar@1203 222 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
sundar@814 223 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
mhaupt@1342 224 additionalparam="-quiet" failonerror="true" useexternalfile="true">
jlaskey@2 225 <classpath>
jlaskey@2 226 <pathelement location="${build.classes.dir}"/>
jlaskey@2 227 </classpath>
jlaskey@2 228 <fileset dir="${src.dir}" includes="**/*.java"/>
sundar@9 229 <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
sundar@814 230 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
sundar@9 231 <!-- The following tags are used only in ASM sources - just ignore these -->
sundar@9 232 <tag name="label" description="label tag in ASM sources" enabled="false"/>
sundar@9 233 <tag name="linked" description="linked tag in ASM sources" enabled="false"/>
sundar@9 234 <tag name="associates" description="associates tag in ASM sources" enabled="false"/>
jlaskey@2 235 </javadoc>
jlaskey@2 236 </target>
jlaskey@2 237
mhaupt@1342 238 <!-- generate javadoc for Nashorn classes -->
mhaupt@1342 239 <target name="javadocnh" depends="jar">
sundar@1371 240 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
mhaupt@1342 241 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
mhaupt@1342 242 additionalparam="-quiet" failonerror="true" useexternalfile="true">
mhaupt@1342 243 <classpath>
mhaupt@1342 244 <pathelement location="${build.classes.dir}"/>
mhaupt@1342 245 </classpath>
sundar@1371 246 <fileset dir="${nashorn.module.src.dir}" includes="**/*.java"/>
sundar@1371 247 <fileset dir="${nashorn.shell.module.src.dir}" includes="**/*.java"/>
mhaupt@1342 248 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
mhaupt@1342 249 </javadoc>
mhaupt@1342 250 </target>
mhaupt@1342 251
sundar@814 252 <!-- generate javadoc only for nashorn extension api classes -->
sundar@814 253 <target name="javadocapi" depends="jar">
mhaupt@1342 254 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
mhaupt@1342 255 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
mhaupt@1342 256 additionalparam="-quiet" failonerror="true" useexternalfile="true">
sundar@814 257 <classpath>
sundar@814 258 <pathelement location="${build.classes.dir}"/>
sundar@814 259 </classpath>
sundar@814 260 <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
sundar@814 261 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
sundar@814 262 </javadoc>
sundar@814 263 </target>
sundar@814 264
sundar@814 265
jlaskey@2 266 <!-- generate shell.html for shell tool documentation -->
jlaskey@2 267 <target name="shelldoc" depends="jar">
jlaskey@2 268 <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
chegar@1123 269 <jvmarg line="${boot.class.path}"/>
jlaskey@2 270 <arg value="-scripting"/>
jlaskey@2 271 <arg value="docs/genshelldoc.js"/>
jlaskey@2 272 </java>
jlaskey@2 273 </target>
jlaskey@2 274
jlaskey@2 275 <!-- generate all docs -->
jlaskey@2 276 <target name="docs" depends="javadoc, shelldoc"/>
jlaskey@2 277
jlaskey@2 278 <!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
jlaskey@2 279 <target name="dist" depends="jar">
jlaskey@2 280 <zip destfile="${build.zip}" basedir=".."
jlaskey@2 281 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
jlaskey@2 282 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
jlaskey@2 283 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
jlaskey@2 284 </target>
jlaskey@2 285
jlaskey@2 286 <target name="compile-test" depends="compile, run-nasgen" if="testng.available">
jlaskey@2 287 <!-- testng task -->
jlaskey@2 288 <taskdef name="testng" classname="org.testng.TestNGAntTask"
jlaskey@2 289 classpath="${file.reference.testng.jar}"/>
jlaskey@2 290
jlaskey@2 291 <javac srcdir="${test.src.dir}"
jlaskey@2 292 destdir="${build.test.classes.dir}"
jlaskey@2 293 classpath="${javac.test.classpath}"
jlaskey@2 294 source="${javac.source}"
jlaskey@2 295 target="${javac.target}"
jlaskey@2 296 debug="${javac.debug}"
jlaskey@2 297 encoding="${javac.encoding}"
sundar@427 298 includeantruntime="false" fork="true">
sundar@1129 299 <compilerarg value="${boot.class.path}"/>
sundar@427 300 <compilerarg value="-Xlint:unchecked"/>
sundar@427 301 <compilerarg value="-Xlint:deprecation"/>
sundar@764 302 <compilerarg value="-Xdiags:verbose"/>
sundar@277 303 </javac>
sundar@76 304
sundar@551 305 <copy todir="${build.test.classes.dir}/META-INF/services">
sundar@551 306 <fileset dir="${test.src.dir}/META-INF/services/"/>
sundar@551 307 </copy>
sundar@551 308
sundar@1235 309 <copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/test/resources">
sundar@1235 310 <fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/test/resources"/>
sundar@586 311 </copy>
sundar@586 312
sundar@1235 313 <copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/test/resources">
sundar@1235 314 <fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/test/resources"/>
hannesw@761 315 </copy>
hannesw@761 316
sundar@76 317 <!-- tests that check nashorn internals and internal API -->
sundar@76 318 <jar jarfile="${nashorn.internal.tests.jar}">
sundar@135 319 <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/>
sundar@76 320 </jar>
sundar@76 321
sundar@76 322 <!-- tests that check nashorn script engine (jsr-223) API -->
sundar@76 323 <jar jarfile="${nashorn.api.tests.jar}">
sundar@135 324 <fileset dir="${build.test.classes.dir}" includes="**/api/**"/>
sundar@551 325 <fileset dir="${build.test.classes.dir}" includes="**/META-INF/**"/>
sundar@586 326 <fileset dir="${build.test.classes.dir}" includes="**/resources/*.js"/>
sundar@76 327 </jar>
sundar@76 328
jlaskey@2 329 </target>
jlaskey@2 330
attila@91 331 <target name="generate-policy-file" depends="prepare">
attila@403 332 <echo file="${build.dir}/nashorn.policy">
sundar@76 333
yan@978 334 grant codeBase "file:/${toString:dist.path}/nashorn.jar" {
sundar@804 335 permission java.security.AllPermission;
sundar@804 336 };
sundar@804 337
attila@403 338 grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" {
attila@403 339 permission java.security.AllPermission;
attila@403 340 };
jlaskey@391 341
sundar@1203 342 grant codeBase "file:/${basedir}/${nashorn.api.tests.jar}" {
sundar@1203 343 permission java.util.PropertyPermission "parserapitest.*", "read";
sundar@1203 344 permission java.util.PropertyPermission "test.*", "read";
sundar@1203 345 permission java.util.PropertyPermission "test262.*", "read";
sundar@1203 346 permission java.io.FilePermission "${basedir}/test/-","read";
sundar@1203 347 permission java.io.FilePermission "$${user.dir}", "read";
sundar@1203 348 permission java.util.PropertyPermission "user.dir", "read";
sundar@1203 349 };
sundar@1203 350
attila@403 351 grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
attila@403 352 permission java.security.AllPermission;
attila@403 353 };
sundar@935 354 //// in case of absolute path:
sundar@935 355 grant codeBase "file:/${nashorn.internal.tests.jar}" {
sundar@935 356 permission java.security.AllPermission;
sundar@935 357 };
sundar@935 358
sundar@935 359 grant codeBase "file:/${file.reference.testng.jar}" {
sundar@935 360 permission java.security.AllPermission;
sundar@935 361 };
jlaskey@2 362
attila@403 363 grant codeBase "file:/${basedir}/test/script/trusted/*" {
attila@403 364 permission java.security.AllPermission;
attila@403 365 };
jlaskey@2 366
sundar@742 367 grant codeBase "file:/${basedir}/test/script/maptests/*" {
sundar@742 368 permission java.io.FilePermission "${basedir}/test/script/maptests/*","read";
sundar@742 369 permission java.lang.RuntimePermission "nashorn.debugMode";
sundar@742 370 };
sundar@742 371
attila@403 372 grant codeBase "file:/${basedir}/test/script/basic/*" {
attila@403 373 permission java.io.FilePermission "${basedir}/test/script/-", "read";
attila@403 374 permission java.io.FilePermission "$${user.dir}", "read";
attila@403 375 permission java.util.PropertyPermission "user.dir", "read";
attila@403 376 permission java.util.PropertyPermission "nashorn.test.*", "read";
attila@403 377 };
attila@403 378
sundar@550 379 grant codeBase "file:/${basedir}/test/script/basic/parser/*" {
sundar@550 380 permission java.io.FilePermission "${basedir}/test/script/-", "read";
sundar@550 381 permission java.io.FilePermission "$${user.dir}", "read";
sundar@550 382 permission java.util.PropertyPermission "user.dir", "read";
sundar@550 383 permission java.util.PropertyPermission "nashorn.test.*", "read";
sundar@550 384 };
sundar@550 385
hannesw@997 386 grant codeBase "file:/${basedir}/test/script/basic/es6/*" {
hannesw@997 387 permission java.io.FilePermission "${basedir}/test/script/-", "read";
hannesw@997 388 permission java.io.FilePermission "$${user.dir}", "read";
hannesw@997 389 permission java.util.PropertyPermission "user.dir", "read";
hannesw@997 390 permission java.util.PropertyPermission "nashorn.test.*", "read";
hannesw@997 391 };
hannesw@997 392
attila@403 393 grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" {
attila@403 394 permission java.util.PropertyPermission "java.security.policy", "read";
attila@403 395 };
attila@457 396
attila@457 397 grant codeBase "file:/${basedir}/test/script/basic/classloader.js" {
attila@457 398 permission java.lang.RuntimePermission "nashorn.JavaReflection";
attila@457 399 };
attila@457 400
sundar@695 401 grant codeBase "file:/${basedir}/test/script/markdown.js" {
sundar@695 402 permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read";
sundar@695 403 };
sundar@695 404
attila@403 405 </echo>
jlaskey@2 406
jlaskey@2 407 <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators -->
jlaskey@2 408 <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs -->
jlaskey@2 409
jlaskey@2 410 </target>
jlaskey@2 411
jlaskey@2 412 <target name="check-external-tests">
jlaskey@2 413 <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/>
jlaskey@2 414 <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/>
jlaskey@2 415 <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/>
jlaskey@2 416 <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/>
jlaskey@2 417 <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
jlaskey@2 418 <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
jlaskey@2 419 <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/>
sundar@695 420 <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/>
jlaskey@2 421 </target>
jlaskey@2 422
jlaskey@2 423 <target name="check-testng" unless="testng.available">
mhaupt@1300 424 <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under ${test.lib} directory."/>
jlaskey@2 425 </target>
jlaskey@2 426
sundar@888 427 <!-- only to be invoked as dependency of "test" target -->
sundar@888 428 <target name="-test-classes-all" depends="jar" unless="test.class">
sundar@888 429 <fileset id="test.classes" dir="${build.test.classes.dir}">
sundar@1240 430 <include name="**/api/javaaccess/test/*Test.class"/>
sundar@1240 431 <include name="**/api/scripting/test/*Test.class"/>
sundar@1240 432 <include name="**/api/tree/test/*Test.class"/>
sundar@1240 433 <include name="**/codegen/test/*Test.class"/>
sundar@1240 434 <include name="**/parser/test/*Test.class"/>
sundar@1240 435 <include name="**/runtime/test/*Test.class"/>
sundar@1240 436 <include name="**/runtime/regexp/test/*Test.class"/>
sundar@1240 437 <include name="**/runtime/regexp/joni/test/*Test.class"/>
sundar@888 438 <include name="**/framework/*Test.class"/>
sundar@888 439 </fileset>
sundar@888 440 </target>
jlaskey@2 441
sundar@888 442 <!-- only to be invoked as dependency of "test" target -->
sundar@888 443 <target name="-test-classes-single" depends="jar" if="test.class">
sundar@888 444 <fileset id="test.classes" dir="${build.test.classes.dir}">
sundar@888 445 <include name="${test.class}*"/>
sundar@888 446 </fileset>
sundar@888 447 </target>
sundar@888 448
sundar@888 449 <!-- only to be invoked as dependency of "test" target -->
sundar@888 450 <target name="-test-nosecurity" unless="test.class">
sundar@807 451 <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
sundar@807 452 <include name="**/framework/ScriptTest.class"/>
sundar@807 453 </fileset>
attila@1058 454 <testng outputdir="${build.nosecurity.test.results.dir}/${testResultsSubDir}" classfilesetref="test.nosecurity.classes"
sundar@807 455 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
chegar@1123 456 <jvmarg line="${boot.class.path}"/>
sundar@935 457 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
sundar@934 458 <sysproperty key="nashorn.jar" value="${dist.dir}/nashorn.jar"/>
sundar@807 459 <propertyset>
sundar@807 460 <propertyref prefix="nashorn."/>
sundar@807 461 </propertyset>
sundar@807 462 <propertyset>
sundar@807 463 <propertyref prefix="test-sys-prop-no-security."/>
sundar@807 464 <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
sundar@807 465 </propertyset>
lagergren@1051 466 <sysproperty key="optimistic.override" value="${optimistic}"/>
sundar@807 467 <classpath>
sundar@807 468 <pathelement path="${run.test.classpath}"/>
sundar@807 469 </classpath>
sundar@807 470 </testng>
jlaskey@2 471 </target>
jlaskey@2 472
sundar@888 473 <!-- only to be invoked as dependency of "test" target -->
sundar@888 474 <target name="-test-security">
sundar@888 475 <delete dir="${build.dir}/nashorn_code_cache"/>
sundar@888 476 <property name="debug.test.jvmargs" value=""/>
attila@1058 477 <testng outputdir="${build.test.results.dir}/${testResultsSubDir}" classfilesetref="test.classes"
sundar@1203 478 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
chegar@1123 479 <jvmarg line="${boot.class.path}"/>
sundar@935 480 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
sundar@888 481 <jvmarg line="${debug.test.jvmargs}"/>
sundar@888 482 <propertyset>
sundar@888 483 <propertyref prefix="nashorn."/>
sundar@888 484 </propertyset>
sundar@888 485 <propertyset>
sundar@888 486 <propertyref prefix="test-sys-prop."/>
sundar@888 487 <mapper from="test-sys-prop.*" to="*" type="glob"/>
sundar@888 488 </propertyset>
lagergren@1051 489 <sysproperty key="optimistic.override" value="${optimistic}"/>
sundar@888 490 <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
sundar@888 491 <classpath>
sundar@888 492 <pathelement path="${run.test.classpath}"/>
sundar@888 493 </classpath>
sundar@888 494 </testng>
sundar@888 495 </target>
sundar@888 496
mhaupt@1360 497 <target name="test" depends="prepare, javadocnh, test-pessimistic, test-optimistic"/>
lagergren@1051 498
lagergren@1051 499 <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">
lagergren@1051 500 <echo message="Running test suite in OPTIMISTIC mode..."/>
lagergren@1051 501 <antcall target="-test-nosecurity" inheritRefs="true">
lagergren@1051 502 <param name="optimistic" value="true"/>
attila@1058 503 <param name="testResultsSubDir" value="optimistic"/>
sundar@1203 504 </antcall>
lagergren@1051 505 <antcall target="-test-security" inheritRefs="true">
lagergren@1051 506 <param name="optimistic" value="true"/>
attila@1058 507 <param name="testResultsSubDir" value="optimistic"/>
lagergren@1051 508 </antcall>
lagergren@1051 509 </target>
lagergren@1051 510
lagergren@1051 511 <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">
lagergren@1051 512 <echo message="Running test suite in PESSIMISTIC mode..."/>
lagergren@1051 513 <antcall target="-test-nosecurity" inheritRefs="true">
lagergren@1051 514 <param name="optimistic" value="false"/>
attila@1058 515 <param name="testResultsSubDir" value="pessimistic"/>
sundar@1203 516 </antcall>
lagergren@1051 517 <antcall target="-test-security" inheritRefs="true">
lagergren@1051 518 <param name="optimistic" value="false"/>
attila@1058 519 <param name="testResultsSubDir" value="pessimistic"/>
lagergren@1051 520 </antcall>
lagergren@1051 521 </target>
sundar@888 522
kshefov@637 523 <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
kshefov@637 524 <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."/>
kshefov@637 525 </target>
kshefov@637 526
mhaupt@1360 527 <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
kshefov@637 528 <fileset id="test.classes" dir="${build.test.classes.dir}">
kshefov@637 529 <include name="**/framework/*Test.class"/>
kshefov@637 530 </fileset>
lagergren@866 531
kshefov@637 532 <copy file="${file.reference.jfxrt.jar}" todir="dist"/>
lagergren@866 533
kshefov@666 534 <condition property="jfx.prism.order" value="-Dprism.order=j2d" else=" ">
lagergren@866 535 <not>
kshefov@666 536 <os family="mac"/>
kshefov@666 537 </not>
lagergren@866 538 </condition>
lagergren@866 539
kshefov@637 540 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
kshefov@637 541 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
slugovoy@1184 542 <jvmarg line="${boot.class.path}"/>
sundar@935 543 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
kshefov@637 544 <propertyset>
kshefov@637 545 <propertyref prefix="testjfx-test-sys-prop."/>
kshefov@637 546 <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
kshefov@637 547 </propertyset>
kshefov@666 548 <sysproperty key="test.fork.jvm.options" value="${testjfx-test-sys-prop.test.fork.jvm.options} ${jfx.prism.order}"/>
kshefov@637 549 <classpath>
kshefov@637 550 <pathelement path="${testjfx.run.test.classpath}"/>
kshefov@637 551 </classpath>
kshefov@637 552 </testng>
kshefov@637 553 </target>
lagergren@866 554
mhaupt@1360 555 <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
sundar@695 556 <fileset id="test.classes" dir="${build.test.classes.dir}">
sundar@695 557 <include name="**/framework/*Test.class"/>
sundar@695 558 </fileset>
sundar@695 559
sundar@695 560 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
sundar@695 561 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
slugovoy@1184 562 <jvmarg line="${boot.class.path}"/>
sundar@935 563 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
sundar@695 564 <propertyset>
sundar@695 565 <propertyref prefix="testmarkdown-test-sys-prop."/>
sundar@695 566 <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/>
sundar@695 567 </propertyset>
sundar@695 568 <classpath>
sundar@695 569 <pathelement path="${run.test.classpath}"/>
sundar@695 570 </classpath>
sundar@695 571 </testng>
sundar@695 572 </target>
lagergren@866 573
mhaupt@1360 574 <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
jlaskey@2 575 <fileset id="test.classes" dir="${build.test.classes.dir}">
jlaskey@2 576 <include name="**/framework/*Test.class"/>
jlaskey@2 577 </fileset>
jlaskey@2 578
jlaskey@2 579 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
jlaskey@2 580 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
slugovoy@1184 581 <jvmarg line="${boot.class.path}"/>
sundar@935 582 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
jlaskey@2 583 <propertyset>
sundar@690 584 <propertyref prefix="nashorn."/>
sundar@690 585 </propertyset>
sundar@690 586 <propertyset>
jlaskey@2 587 <propertyref prefix="test262-test-sys-prop."/>
jlaskey@2 588 <mapper from="test262-test-sys-prop.*" to="*" type="glob"/>
jlaskey@2 589 </propertyset>
jlaskey@2 590 <classpath>
jlaskey@2 591 <pathelement path="${run.test.classpath}"/>
jlaskey@2 592 </classpath>
jlaskey@2 593 </testng>
jlaskey@2 594 </target>
jlaskey@2 595
jlaskey@2 596 <target name="test262parallel" depends="test262-parallel"/>
jlaskey@2 597
mhaupt@1360 598 <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
jlaskey@2 599 <!-- use just build.test.classes.dir to avoid referring to TestNG -->
sundar@86 600 <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
chegar@1123 601 <jvmarg line="${boot.class.path}"/>
sundar@935 602 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
sundar@963 603 <!-- avoid too many typeinfo cache files. Each script is run only once anyway -->
sundar@963 604 <jvmarg line="-Dnashorn.typeInfo.disabled=true"/>
sundar@86 605 <classpath>
sundar@86 606 <pathelement path="${run.test.classpath}"/>
sundar@86 607 </classpath>
jlaskey@2 608 <syspropertyset>
jlaskey@2 609 <propertyref prefix="test262-test-sys-prop."/>
jlaskey@2 610 <mapper type="glob" from="test262-test-sys-prop.*" to="*"/>
jlaskey@2 611 </syspropertyset>
jlaskey@2 612 </java>
jlaskey@2 613 </target>
jlaskey@2 614
attila@817 615 <target name="testparallel" depends="test-parallel"/>
attila@817 616
mhaupt@1360 617 <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
attila@817 618 <!-- use just build.test.classes.dir to avoid referring to TestNG -->
attila@817 619 <java classname="${parallel.test.runner}" dir="${basedir}"
lagergren@866 620 failonerror="true"
lagergren@866 621 fork="true">
chegar@1123 622 <jvmarg line="${boot.class.path}"/>
attila@817 623 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
attila@817 624 <classpath>
attila@817 625 <pathelement path="${run.test.classpath}"/>
lagergren@866 626 <pathelement path="${build.test.classes.dir}"/>
attila@817 627 </classpath>
attila@817 628 <syspropertyset>
attila@817 629 <propertyref prefix="test-sys-prop."/>
attila@817 630 <mapper type="glob" from="test-sys-prop.*" to="*"/>
attila@817 631 </syspropertyset>
attila@817 632 </java>
attila@817 633 </target>
attila@817 634
jlaskey@2 635 <target name="all" depends="test, docs"
jlaskey@2 636 description="Build, test and generate docs for nashorn"/>
jlaskey@2 637
jlaskey@2 638 <target name="run" depends="jar"
jlaskey@2 639 description="Run the shell with a sample script">
jlaskey@2 640 <java classname="${nashorn.shell.tool}" fork="true" dir="samples">
chegar@1123 641 <jvmarg line="${boot.class.path}"/>
hannesw@561 642 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
jlaskey@2 643 <arg value="-dump-on-error"/>
jlaskey@2 644 <arg value="test.js"/>
jlaskey@2 645 </java>
jlaskey@2 646 </target>
jlaskey@2 647
jlaskey@2 648 <target name="debug" depends="jar"
jlaskey@2 649 description="Debug the shell with a sample script">
jlaskey@2 650 <java classname="${nashorn.shell.tool}" fork="true" dir="samples">
chegar@1123 651 <jvmarg line="${boot.class.path}"/>
hannesw@561 652 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
jlaskey@2 653 <arg value="--print-code"/>
jlaskey@2 654 <arg value="--verify-code"/>
jlaskey@2 655 <arg value="--print-symbols"/>
jlaskey@2 656 <jvmarg value="-Dnashorn.codegen.debug=true"/>
jlaskey@2 657 <arg value="test.js"/>
jlaskey@2 658 </java>
jlaskey@2 659 </target>
sundar@18 660
sundar@18 661 <!-- targets to get external script tests -->
sundar@18 662
sundar@18 663 <!-- test262 test suite -->
sundar@18 664 <target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}">
sundar@774 665 <!-- clone test262 git repo -->
sundar@774 666 <exec executable="${git.executable}">
sundar@18 667 <arg value="clone"/>
sundar@954 668 <arg value="--branch"/>
sundar@954 669 <arg value="es5-tests"/>
sundar@774 670 <arg value="https://github.com/tc39/test262"/>
sundar@18 671 <arg value="${test.external.dir}/test262"/>
sundar@18 672 </exec>
sundar@18 673 </target>
sundar@18 674 <target name="update-test262" depends="init" if="${test-sys-prop.external.test262}">
sundar@774 675 <!-- update test262 git repo -->
sundar@774 676 <exec executable="${git.executable}" dir="${test.external.dir}/test262">
sundar@18 677 <arg value="pull"/>
sundar@18 678 </exec>
sundar@18 679 </target>
sundar@18 680
sundar@18 681 <!-- octane benchmark -->
sundar@18 682 <target name="get-octane" depends="init" unless="${test-sys-prop.external.octane}">
sundar@18 683 <!-- checkout octane benchmarks -->
sundar@18 684 <exec executable="${svn.executable}">
sundar@18 685 <arg value="--non-interactive"/>
sundar@18 686 <arg value="--trust-server-cert"/>
sundar@18 687 <arg value="checkout"/>
sundar@18 688 <arg value="http://octane-benchmark.googlecode.com/svn/trunk/"/>
sundar@18 689 <arg value="${test.external.dir}/octane"/>
sundar@18 690 </exec>
sundar@18 691 </target>
sundar@18 692 <target name="update-octane" depends="init" if="${test-sys-prop.external.octane}">
sundar@18 693 <!-- update octane benchmarks -->
sundar@18 694 <exec executable="${svn.executable}" dir="${test.external.dir}/octane">
sundar@18 695 <arg value="--non-interactive"/>
sundar@18 696 <arg value="--trust-server-cert"/>
sundar@18 697 <arg value="update"/>
sundar@18 698 </exec>
sundar@18 699 </target>
sundar@18 700
sundar@18 701 <!-- sunspider benchmark -->
sundar@18 702 <target name="get-sunspider" depends="init" unless="${test-sys-prop.external.sunspider}">
sundar@18 703 <!-- checkout sunspider -->
sundar@18 704 <exec executable="${svn.executable}">
sundar@18 705 <arg value="--non-interactive"/>
sundar@18 706 <arg value="--trust-server-cert"/>
sundar@18 707 <arg value="checkout"/>
sundar@18 708 <arg value="http://svn.webkit.org/repository/webkit/trunk/PerformanceTests/SunSpider"/>
sundar@18 709 <arg value="${test.external.dir}/sunspider"/>
sundar@18 710 </exec>
sundar@18 711 </target>
sundar@18 712 <target name="update-sunspider" depends="init" if="${test-sys-prop.external.sunspider}">
sundar@18 713 <!-- update sunspider -->
sundar@18 714 <exec executable="${svn.executable}" dir="${test.external.dir}/sunspider">
sundar@18 715 <arg value="--non-interactive"/>
sundar@18 716 <arg value="--trust-server-cert"/>
sundar@18 717 <arg value="update"/>
sundar@18 718 </exec>
sundar@18 719 </target>
sundar@18 720
sundar@18 721 <!-- get all external test scripts -->
mhaupt@1360 722 <target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider">
sundar@18 723 <!-- make external test dir -->
jlaskey@391 724 <mkdir dir="${test.external.dir}"/>
sundar@18 725
sundar@18 726 <!-- jquery -->
jlaskey@391 727 <mkdir dir="${test.external.dir}/jquery"/>
sundar@18 728 <get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
sundar@18 729 <get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
sundar@18 730
sundar@18 731 <!-- prototype -->
jlaskey@391 732 <mkdir dir="${test.external.dir}/prototype"/>
sundar@18 733 <get src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0/prototype.js" dest="${test.external.dir}/prototype" usetimestamp="true" skipexisting="true" ignoreerrors="true"/>
sundar@18 734
sundar@18 735 <!-- underscorejs -->
jlaskey@391 736 <mkdir dir="${test.external.dir}/underscore"/>
sundar@18 737 <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
sundar@18 738 <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
sundar@18 739
sundar@18 740 <!-- yui -->
jlaskey@391 741 <mkdir dir="${test.external.dir}/yui"/>
sundar@18 742 <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
sundar@18 743 <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
lagergren@866 744
sundar@695 745 <!-- showdown -->
sundar@695 746 <mkdir dir="${test.external.dir}/showdown"/>
mhaupt@1299 747 <get src="https://raw.githubusercontent.com/showdownjs/showdown/0.5.4/src/showdown.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
mhaupt@1299 748 <get src="https://raw.githubusercontent.com/showdownjs/showdown/0.5.4/src/extensions/table.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
sundar@18 749
sundar@18 750 </target>
sundar@18 751
sundar@18 752 <!-- update external test suites that are pulled from source control systems -->
sundar@25 753 <target name="update-externals" depends="init, check-external-tests, update-test262, update-octane, update-sunspider"/>
sundar@25 754
sundar@25 755 <!-- run all perf tests -->
sundar@25 756 <target name="perf" depends="externals, update-externals, sunspider, octane"/>
sundar@25 757
mhaupt@1300 758 <!-- download and install testng.jar -->
mhaupt@1360 759 <target name="get-testng" unless="testng.already.present">
mhaupt@1300 760 <get src="http://testng.org/testng-6.8.zip" dest="${test.lib}" skipexisting="true" ignoreerrors="true"/>
mhaupt@1300 761 <unzip src="${test.lib}${file.separator}testng-6.8.zip" dest="${test.lib}">
mhaupt@1300 762 <patternset>
mhaupt@1300 763 <include name="testng-6.8/testng-6.8.jar"/>
mhaupt@1300 764 </patternset>
mhaupt@1300 765 </unzip>
mhaupt@1300 766 <move file="${test.lib}${file.separator}testng-6.8${file.separator}testng-6.8.jar" tofile="${test.lib}${file.separator}testng.jar"/>
mhaupt@1300 767 <delete dir="${test.lib}${file.separator}testng-6.8"/>
mhaupt@1300 768 </target>
mhaupt@1300 769
mhaupt@1301 770 <!-- run all tests -->
mhaupt@1360 771 <target name="alltests" depends="externals, update-externals, test, test262parallel, testmarkdown, perf"/>
sundar@18 772
lagergren@865 773 <import file="build-benchmark.xml"/>
lagergren@865 774
jlaskey@2 775 </project>