make/build.xml

Wed, 18 Oct 2017 09:15:26 -0700

author
asaha
date
Wed, 18 Oct 2017 09:15:26 -0700
changeset 2196
c21cf096431b
parent 1837
27842bf384fe
child 1959
61ffdd1b89f2
permissions
-rw-r--r--

Added tag jdk8u161-b03 for changeset e33ecc88dd63

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

mercurial