make/build.xml

Thu, 24 May 2018 16:39:31 +0800

author
aoqi
date
Thu, 24 May 2018 16:39:31 +0800
changeset 1959
61ffdd1b89f2
parent 1837
27842bf384fe
parent 1490
d85f981c8cf8
permissions
-rw-r--r--

Merge

aoqi@0 1 <?xml version="1.0" encoding="UTF-8"?>
attila@963 2
aoqi@0 3 <!--
mhaupt@1391 4 Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
aoqi@0 5 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 6
aoqi@0 7 This code is free software; you can redistribute it and/or modify it
aoqi@0 8 under the terms of the GNU General Public License version 2 only, as
aoqi@0 9 published by the Free Software Foundation.
aoqi@0 10
aoqi@0 11 This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 accompanied this code).
aoqi@0 16
aoqi@0 17 You should have received a copy of the GNU General Public License version
aoqi@0 18 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20
aoqi@0 21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 or visit www.oracle.com if you need additional information or have any
aoqi@0 23 questions.
aoqi@0 24 -->
attila@963 25
aoqi@0 26 <project name="nashorn" default="test" basedir="..">
aoqi@0 27 <import file="build-nasgen.xml"/>
aoqi@0 28 <import file="code_coverage.xml"/>
aoqi@0 29
aoqi@0 30 <target name="init-conditions">
aoqi@0 31 <!-- loading locally defined resources and properties. NB they owerwrite default ones defined later -->
aoqi@0 32 <property file="${user.home}/.nashorn.project.local.properties"/>
aoqi@0 33
aoqi@0 34 <loadproperties srcFile="make/project.properties"/>
yan@984 35 <path id="dist.path">
yan@984 36 <pathelement location="${dist.dir}"/>
yan@984 37 </path>
aoqi@0 38 <path id="nashorn.ext.path">
aoqi@0 39 <pathelement location="${dist.dir}"/>
sundar@966 40 <pathelement location="${java.ext.dirs}"/>
aoqi@0 41 </path>
aoqi@0 42 <property name="ext.class.path" value="-Djava.ext.dirs=&quot;${toString:nashorn.ext.path}&quot;"/>
aoqi@0 43 <condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
aoqi@0 44 <available file="/usr/local/bin/svn"/>
aoqi@0 45 </condition>
aoqi@0 46 <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
aoqi@0 47 <available file="/usr/local/bin/hg"/>
aoqi@0 48 </condition>
aoqi@0 49 <condition property="git.executable" value="/usr/local/bin/git" else="git">
aoqi@0 50 <available file="/usr/local/bin/git"/>
aoqi@0 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 -->
aoqi@0 63 <condition property="jemmy.jfx.testng.available" value="true">
attila@963 64 <and>
aoqi@0 65 <available file="${file.reference.jemmyfx.jar}"/>
aoqi@0 66 <available file="${file.reference.jemmycore.jar}"/>
aoqi@0 67 <available file="${file.reference.jemmyawtinput.jar}"/>
aoqi@0 68 <available file="${file.reference.jfxrt.jar}"/>
aoqi@0 69 <isset property="testng.available"/>
aoqi@0 70 </and>
aoqi@0 71 </condition>
aoqi@0 72
aoqi@0 73 <!-- enable/disable make code coverage -->
aoqi@0 74 <condition property="cc.enabled">
aoqi@0 75 <istrue value="${make.code.coverage}" />
aoqi@0 76 </condition>
aoqi@0 77
aoqi@0 78 <!-- exclude tests in exclude lists -->
aoqi@0 79 <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt">
aoqi@0 80 <istrue value="${make.code.coverage}" />
aoqi@0 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>
aoqi@0 92 </target>
aoqi@0 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>
aoqi@0 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">
aoqi@0 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}"/>
aoqi@0 121
aoqi@0 122 <echo message="run.test.jvmargs=${run.test.jvmargs}"/>
aoqi@0 123 <echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/>
aoqi@0 124 <echo message="run.test.xms=${run.test.xms}"/>
aoqi@0 125 <echo message="run.test.xmx=${run.test.xmx}"/>
aoqi@0 126
aoqi@0 127 </target>
aoqi@0 128
aoqi@0 129 <target name="prepare" depends="init">
aoqi@0 130 <mkdir dir="${build.dir}"/>
aoqi@0 131 <mkdir dir="${build.classes.dir}"/>
aoqi@0 132 <mkdir dir="${build.classes.dir}/META-INF/services"/>
aoqi@0 133 <mkdir dir="${build.test.classes.dir}"/>
aoqi@0 134 <mkdir dir="${dist.dir}"/>
aoqi@0 135 <mkdir dir="${dist.javadoc.dir}"/>
aoqi@0 136 </target>
aoqi@0 137
aoqi@0 138 <target name="clean" depends="init, clean-nasgen, init-cc-cleanup">
aoqi@0 139 <delete includeemptydirs="true">
aoqi@0 140 <fileset dir="${build.dir}" erroronmissingdir="false"/>
aoqi@0 141 </delete>
aoqi@0 142 <delete dir="${dist.dir}"/>
aoqi@0 143 </target>
aoqi@0 144
sundar@1061 145 <target name="compile" depends="prepare" description="Compiles nashorn">
aoqi@0 146 <javac srcdir="${src.dir}"
aoqi@0 147 destdir="${build.classes.dir}"
aoqi@0 148 classpath="${javac.classpath}"
aoqi@0 149 source="${javac.source}"
aoqi@0 150 target="${javac.target}"
aoqi@0 151 debug="${javac.debug}"
aoqi@0 152 encoding="${javac.encoding}"
aoqi@0 153 includeantruntime="false" fork="true">
aoqi@0 154 <compilerarg value="-J-Djava.ext.dirs="/>
attila@963 155 <compilerarg value="-Xlint:all"/>
aoqi@0 156 <compilerarg value="-XDignore.symbol.file"/>
aoqi@0 157 <compilerarg value="-Xdiags:verbose"/>
aoqi@0 158 </javac>
aoqi@0 159 <copy todir="${build.classes.dir}/META-INF/services">
aoqi@0 160 <fileset dir="${meta.inf.dir}/services/"/>
aoqi@0 161 </copy>
aoqi@0 162 <copy todir="${build.classes.dir}/jdk/nashorn/api/scripting/resources">
aoqi@0 163 <fileset dir="${src.dir}/jdk/nashorn/api/scripting/resources/"/>
aoqi@0 164 </copy>
aoqi@0 165 <copy todir="${build.classes.dir}/jdk/nashorn/internal/runtime/resources">
aoqi@0 166 <fileset dir="${src.dir}/jdk/nashorn/internal/runtime/resources/"/>
aoqi@0 167 </copy>
aoqi@0 168 <copy todir="${build.classes.dir}/jdk/nashorn/tools/resources">
aoqi@0 169 <fileset dir="${src.dir}/jdk/nashorn/tools/resources/"/>
aoqi@0 170 </copy>
aoqi@0 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"/>
aoqi@0 173
aoqi@0 174 <echo message="full=${nashorn.fullversion}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties"/>
aoqi@0 175 <echo file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true">${line.separator}</echo>
aoqi@0 176 <echo message="release=${nashorn.version}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true"/>
aoqi@0 177 </target>
aoqi@0 178
aoqi@0 179 <target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar" unless="compile.suppress.jar">
aoqi@0 180 <jar jarfile="${dist.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
aoqi@0 181 <fileset dir="${build.classes.dir}"/>
aoqi@0 182 <manifest>
aoqi@0 183 <attribute name="Archiver-Version" value="n/a"/>
aoqi@0 184 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
aoqi@0 185 <attribute name="Built-By" value="n/a"/>
aoqi@0 186 <attribute name="Created-By" value="Ant jar task"/>
aoqi@0 187 <section name="jdk/nashorn/">
aoqi@0 188 <attribute name="Implementation-Title" value="${nashorn.product.name}"/>
aoqi@0 189 <attribute name="Implementation-Version" value="${nashorn.version}"/>
aoqi@0 190 </section>
aoqi@0 191 </manifest>
aoqi@0 192 </jar>
aoqi@0 193 </target>
aoqi@0 194
aoqi@0 195 <target name="use-promoted-nashorn" depends="init">
aoqi@0 196 <delete file="${dist.dir}/nashorn.jar"/>
aoqi@0 197 <copy file="${java.home}/lib/ext/nashorn.jar" todir="${dist.dir}"/>
aoqi@0 198 <property name="compile.suppress.jar" value="defined"/>
aoqi@0 199 </target>
aoqi@0 200
aoqi@0 201 <target name="build-fxshell" depends="jar">
aoqi@0 202 <description>Builds the javafx shell.</description>
aoqi@0 203 <mkdir dir="${fxshell.classes.dir}"/>
aoqi@0 204 <javac srcdir="${fxshell.dir}"
aoqi@0 205 destdir="${fxshell.classes.dir}"
mhaupt@1353 206 classpath="${dist.jar}${path.separator}${javac.classpath}"
aoqi@0 207 debug="${javac.debug}"
aoqi@0 208 encoding="${javac.encoding}"
aoqi@0 209 includeantruntime="false">
aoqi@0 210 </javac>
aoqi@0 211 <jar jarfile="${fxshell.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
aoqi@0 212 <fileset dir="${fxshell.classes.dir}"/>
aoqi@0 213 <manifest>
aoqi@0 214 <attribute name="Archiver-Version" value="n/a"/>
aoqi@0 215 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
aoqi@0 216 <attribute name="Built-By" value="n/a"/>
aoqi@0 217 <attribute name="Created-By" value="Ant jar task"/>
aoqi@0 218 <section name="jdk/nashorn/">
aoqi@0 219 <attribute name="Implementation-Title" value="Oracle Nashorn FXShell"/>
aoqi@0 220 <attribute name="Implementation-Version" value="${nashorn.version}"/>
aoqi@0 221 </section>
aoqi@0 222 </manifest>
aoqi@0 223 </jar>
aoqi@0 224 </target>
aoqi@0 225
sundar@1509 226 <!-- generate javadoc for all Nashorn and ASM classes -->
aoqi@0 227 <target name="javadoc" depends="jar">
sundar@1371 228 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
aoqi@0 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}"/>
aoqi@0 232 <classpath>
aoqi@0 233 <pathelement location="${build.classes.dir}"/>
aoqi@0 234 </classpath>
aoqi@0 235 <fileset dir="${src.dir}" includes="**/*.java"/>
aoqi@0 236 <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
aoqi@0 237 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
aoqi@0 238 <!-- The following tags are used only in ASM sources - just ignore these -->
aoqi@0 239 <tag name="label" description="label tag in ASM sources" enabled="false"/>
aoqi@0 240 <tag name="linked" description="linked tag in ASM sources" enabled="false"/>
aoqi@0 241 <tag name="associates" description="associates tag in ASM sources" enabled="false"/>
aoqi@0 242 </javadoc>
aoqi@0 243 </target>
aoqi@0 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
aoqi@0 259 <!-- generate javadoc only for nashorn extension api classes -->
aoqi@0 260 <target name="javadocapi" depends="jar">
aoqi@0 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}"/>
aoqi@0 264 <classpath>
aoqi@0 265 <pathelement location="${build.classes.dir}"/>
aoqi@0 266 </classpath>
aoqi@0 267 <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
aoqi@0 268 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
aoqi@0 269 </javadoc>
aoqi@0 270 </target>
aoqi@0 271
aoqi@0 272 <!-- generate shell.html for shell tool documentation -->
aoqi@0 273 <target name="shelldoc" depends="jar">
aoqi@0 274 <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
aoqi@0 275 <jvmarg line="${ext.class.path}"/>
aoqi@0 276 <arg value="-scripting"/>
aoqi@0 277 <arg value="docs/genshelldoc.js"/>
aoqi@0 278 </java>
aoqi@0 279 </target>
aoqi@0 280
aoqi@0 281 <!-- generate all docs -->
aoqi@0 282 <target name="docs" depends="javadoc, shelldoc"/>
aoqi@0 283
aoqi@0 284 <!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
aoqi@0 285 <target name="dist" depends="jar">
aoqi@0 286 <zip destfile="${build.zip}" basedir=".."
aoqi@0 287 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
aoqi@0 288 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
aoqi@0 289 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
aoqi@0 290 </target>
aoqi@0 291
aoqi@0 292 <target name="compile-test" depends="compile, run-nasgen" if="testng.available">
aoqi@0 293 <!-- testng task -->
aoqi@0 294 <taskdef name="testng" classname="org.testng.TestNGAntTask"
mhaupt@1741 295 classpath="${testng.ant.classpath}"/>
aoqi@0 296
aoqi@0 297 <javac srcdir="${test.src.dir}"
aoqi@0 298 destdir="${build.test.classes.dir}"
aoqi@0 299 classpath="${javac.test.classpath}"
sundar@1550 300 source="${test.javac.source}"
sundar@1550 301 target="${test.javac.target}"
aoqi@0 302 debug="${javac.debug}"
aoqi@0 303 encoding="${javac.encoding}"
aoqi@0 304 includeantruntime="false" fork="true">
aoqi@0 305 <compilerarg value="-J-Djava.ext.dirs="/>
aoqi@0 306 <compilerarg value="-Xlint:unchecked"/>
aoqi@0 307 <compilerarg value="-Xlint:deprecation"/>
aoqi@0 308 <compilerarg value="-Xdiags:verbose"/>
aoqi@0 309 </javac>
aoqi@0 310
aoqi@0 311 <copy todir="${build.test.classes.dir}/META-INF/services">
aoqi@0 312 <fileset dir="${test.src.dir}/META-INF/services/"/>
aoqi@0 313 </copy>
aoqi@0 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"/>
aoqi@0 317 </copy>
aoqi@0 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"/>
aoqi@0 321 </copy>
aoqi@0 322
aoqi@0 323 <!-- tests that check nashorn internals and internal API -->
aoqi@0 324 <jar jarfile="${nashorn.internal.tests.jar}">
aoqi@0 325 <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/>
aoqi@0 326 </jar>
aoqi@0 327
aoqi@0 328 <!-- tests that check nashorn script engine (jsr-223) API -->
aoqi@0 329 <jar jarfile="${nashorn.api.tests.jar}">
aoqi@0 330 <fileset dir="${build.test.classes.dir}" includes="**/api/**"/>
aoqi@0 331 <fileset dir="${build.test.classes.dir}" includes="**/META-INF/**"/>
aoqi@0 332 <fileset dir="${build.test.classes.dir}" includes="**/resources/*.js"/>
aoqi@0 333 </jar>
aoqi@0 334
aoqi@0 335 </target>
aoqi@0 336
aoqi@0 337 <target name="generate-policy-file" depends="prepare">
aoqi@0 338 <echo file="${build.dir}/nashorn.policy">
aoqi@0 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
aoqi@0 344 grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" {
aoqi@0 345 permission java.security.AllPermission;
aoqi@0 346 };
aoqi@0 347
aoqi@0 348 grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
aoqi@0 349 permission java.security.AllPermission;
aoqi@0 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
aoqi@0 378
aoqi@0 379 grant codeBase "file:/${basedir}/test/script/trusted/*" {
aoqi@0 380 permission java.security.AllPermission;
aoqi@0 381 };
aoqi@0 382
aoqi@0 383 grant codeBase "file:/${basedir}/test/script/maptests/*" {
aoqi@0 384 permission java.io.FilePermission "${basedir}/test/script/maptests/*","read";
aoqi@0 385 permission java.lang.RuntimePermission "nashorn.debugMode";
aoqi@0 386 };
aoqi@0 387
aoqi@0 388 grant codeBase "file:/${basedir}/test/script/basic/*" {
aoqi@0 389 permission java.io.FilePermission "${basedir}/test/script/-", "read";
aoqi@0 390 permission java.io.FilePermission "$${user.dir}", "read";
aoqi@0 391 permission java.util.PropertyPermission "user.dir", "read";
aoqi@0 392 permission java.util.PropertyPermission "nashorn.test.*", "read";
aoqi@0 393 };
aoqi@0 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
aoqi@0 402 grant codeBase "file:/${basedir}/test/script/basic/parser/*" {
aoqi@0 403 permission java.io.FilePermission "${basedir}/test/script/-", "read";
aoqi@0 404 permission java.io.FilePermission "$${user.dir}", "read";
aoqi@0 405 permission java.util.PropertyPermission "user.dir", "read";
aoqi@0 406 permission java.util.PropertyPermission "nashorn.test.*", "read";
aoqi@0 407 };
aoqi@0 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
aoqi@0 416 grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" {
aoqi@0 417 permission java.util.PropertyPermission "java.security.policy", "read";
aoqi@0 418 };
aoqi@0 419
aoqi@0 420 grant codeBase "file:/${basedir}/test/script/basic/classloader.js" {
aoqi@0 421 permission java.lang.RuntimePermission "nashorn.JavaReflection";
aoqi@0 422 };
aoqi@0 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
aoqi@0 432 </echo>
aoqi@0 433
aoqi@0 434 <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators -->
aoqi@0 435 <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs -->
aoqi@0 436
aoqi@0 437 </target>
aoqi@0 438
aoqi@0 439 <target name="check-external-tests">
aoqi@0 440 <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/>
aoqi@0 441 <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/>
aoqi@0 442 <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/>
aoqi@0 443 <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/>
aoqi@0 444 <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
aoqi@0 445 <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
aoqi@0 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"/>
aoqi@0 448 </target>
aoqi@0 449
aoqi@0 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."/>
aoqi@0 452 </target>
aoqi@0 453
aoqi@0 454 <!-- only to be invoked as dependency of "test" target -->
aoqi@0 455 <target name="-test-classes-all" depends="jar" unless="test.class">
aoqi@0 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"/>
aoqi@0 464 <include name="**/framework/*Test.class"/>
aoqi@0 465 </fileset>
aoqi@0 466 </target>
aoqi@0 467
aoqi@0 468 <!-- only to be invoked as dependency of "test" target -->
aoqi@0 469 <target name="-test-classes-single" depends="jar" if="test.class">
aoqi@0 470 <fileset id="test.classes" dir="${build.test.classes.dir}">
aoqi@0 471 <include name="${test.class}*"/>
aoqi@0 472 </fileset>
aoqi@0 473 </target>
aoqi@0 474
aoqi@0 475 <!-- only to be invoked as dependency of "test" target -->
aoqi@0 476 <target name="-test-nosecurity" unless="test.class">
aoqi@0 477 <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
aoqi@0 478 <include name="**/framework/ScriptTest.class"/>
aoqi@0 479 </fileset>
attila@1055 480 <testng outputdir="${build.nosecurity.test.results.dir}/${testResultsSubDir}" classfilesetref="test.nosecurity.classes"
aoqi@0 481 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
aoqi@0 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"/>
aoqi@0 485 <propertyset>
aoqi@0 486 <propertyref prefix="nashorn."/>
aoqi@0 487 </propertyset>
aoqi@0 488 <propertyset>
aoqi@0 489 <propertyref prefix="test-sys-prop-no-security."/>
aoqi@0 490 <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
aoqi@0 491 </propertyset>
lagergren@1036 492 <sysproperty key="optimistic.override" value="${optimistic}"/>
aoqi@0 493 <classpath>
aoqi@0 494 <pathelement path="${run.test.classpath}"/>
aoqi@0 495 </classpath>
aoqi@0 496 </testng>
aoqi@0 497 </target>
aoqi@0 498
aoqi@0 499 <!-- only to be invoked as dependency of "test" target -->
aoqi@0 500 <target name="-test-security">
aoqi@0 501 <delete dir="${build.dir}/nashorn_code_cache"/>
aoqi@0 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}">
aoqi@0 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}"/>
aoqi@0 507 <jvmarg line="${debug.test.jvmargs}"/>
aoqi@0 508 <propertyset>
attila@963 509 <propertyref prefix="nashorn."/>
attila@963 510 </propertyset>
attila@963 511 <propertyset>
aoqi@0 512 <propertyref prefix="test-sys-prop."/>
aoqi@0 513 <mapper from="test-sys-prop.*" to="*" type="glob"/>
aoqi@0 514 </propertyset>
lagergren@1036 515 <sysproperty key="optimistic.override" value="${optimistic}"/>
aoqi@0 516 <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
aoqi@0 517 <classpath>
aoqi@0 518 <pathelement path="${run.test.classpath}"/>
aoqi@0 519 </classpath>
aoqi@0 520 </testng>
aoqi@0 521 </target>
aoqi@0 522
mhaupt@1741 523 <target name="test" depends="prepare, javadocnh, test-pessimistic, test-optimistic"/>
aoqi@0 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>
aoqi@0 547 </target>
aoqi@0 548
aoqi@0 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."/>
aoqi@0 551 </target>
aoqi@0 552
mhaupt@1392 553 <target name="testjfx" depends="jar, get-testng, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
aoqi@0 554 <fileset id="test.classes" dir="${build.test.classes.dir}">
aoqi@0 555 <include name="**/framework/*Test.class"/>
aoqi@0 556 </fileset>
attila@963 557
aoqi@0 558 <copy file="${file.reference.jfxrt.jar}" todir="dist"/>
attila@963 559
aoqi@0 560 <condition property="jfx.prism.order" value="-Dprism.order=j2d" else=" ">
attila@963 561 <not>
aoqi@0 562 <os family="mac"/>
aoqi@0 563 </not>
attila@963 564 </condition>
attila@963 565
aoqi@0 566 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
aoqi@0 567 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
aoqi@0 568 <jvmarg line="${ext.class.path}"/>
attila@963 569 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
aoqi@0 570 <propertyset>
aoqi@0 571 <propertyref prefix="testjfx-test-sys-prop."/>
aoqi@0 572 <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
aoqi@0 573 </propertyset>
aoqi@0 574 <sysproperty key="test.fork.jvm.options" value="${testjfx-test-sys-prop.test.fork.jvm.options} ${jfx.prism.order}"/>
aoqi@0 575 <classpath>
aoqi@0 576 <pathelement path="${testjfx.run.test.classpath}"/>
aoqi@0 577 </classpath>
aoqi@0 578 </testng>
aoqi@0 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">
aoqi@0 601 <fileset id="test.classes" dir="${build.test.classes.dir}">
aoqi@0 602 <include name="**/framework/*Test.class"/>
aoqi@0 603 </fileset>
aoqi@0 604
aoqi@0 605 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
aoqi@0 606 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
aoqi@0 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>
aoqi@0 612 <propertyset>
aoqi@0 613 <propertyref prefix="test262-test-sys-prop."/>
aoqi@0 614 <mapper from="test262-test-sys-prop.*" to="*" type="glob"/>
aoqi@0 615 </propertyset>
aoqi@0 616 <classpath>
aoqi@0 617 <pathelement path="${run.test.classpath}"/>
aoqi@0 618 </classpath>
aoqi@0 619 </testng>
aoqi@0 620 </target>
aoqi@0 621
aoqi@0 622 <target name="test262parallel" depends="test262-parallel"/>
aoqi@0 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">
aoqi@0 625 <!-- use just build.test.classes.dir to avoid referring to TestNG -->
aoqi@0 626 <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
aoqi@0 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"/>
aoqi@0 631 <classpath>
aoqi@0 632 <pathelement path="${run.test.classpath}"/>
aoqi@0 633 </classpath>
aoqi@0 634 <syspropertyset>
aoqi@0 635 <propertyref prefix="test262-test-sys-prop."/>
aoqi@0 636 <mapper type="glob" from="test262-test-sys-prop.*" to="*"/>
aoqi@0 637 </syspropertyset>
aoqi@0 638 </java>
aoqi@0 639 </target>
aoqi@0 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
aoqi@0 661 <target name="all" depends="test, docs"
aoqi@0 662 description="Build, test and generate docs for nashorn"/>
aoqi@0 663
aoqi@0 664 <target name="run" depends="jar"
aoqi@0 665 description="Run the shell with a sample script">
aoqi@0 666 <java classname="${nashorn.shell.tool}" fork="true" dir="samples">
aoqi@0 667 <jvmarg line="${ext.class.path}"/>
aoqi@0 668 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
aoqi@0 669 <arg value="-dump-on-error"/>
aoqi@0 670 <arg value="test.js"/>
aoqi@0 671 </java>
aoqi@0 672 </target>
aoqi@0 673
aoqi@0 674 <target name="debug" depends="jar"
aoqi@0 675 description="Debug the shell with a sample script">
aoqi@0 676 <java classname="${nashorn.shell.tool}" fork="true" dir="samples">
aoqi@0 677 <jvmarg line="${ext.class.path}"/>
aoqi@0 678 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
aoqi@0 679 <arg value="--print-code"/>
aoqi@0 680 <arg value="--verify-code"/>
aoqi@0 681 <arg value="--print-symbols"/>
aoqi@0 682 <jvmarg value="-Dnashorn.codegen.debug=true"/>
aoqi@0 683 <arg value="test.js"/>
aoqi@0 684 </java>
aoqi@0 685 </target>
aoqi@0 686
aoqi@0 687 <!-- targets to get external script tests -->
aoqi@0 688
aoqi@0 689 <!-- test262 test suite -->
aoqi@0 690 <target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}">
aoqi@0 691 <!-- clone test262 git repo -->
aoqi@0 692 <exec executable="${git.executable}">
aoqi@0 693 <arg value="clone"/>
attila@963 694 <arg value="--branch"/>
attila@963 695 <arg value="es5-tests"/>
aoqi@0 696 <arg value="https://github.com/tc39/test262"/>
aoqi@0 697 <arg value="${test.external.dir}/test262"/>
aoqi@0 698 </exec>
aoqi@0 699 </target>
aoqi@0 700 <target name="update-test262" depends="init" if="${test-sys-prop.external.test262}">
aoqi@0 701 <!-- update test262 git repo -->
aoqi@0 702 <exec executable="${git.executable}" dir="${test.external.dir}/test262">
aoqi@0 703 <arg value="pull"/>
aoqi@0 704 </exec>
aoqi@0 705 </target>
aoqi@0 706
aoqi@0 707 <!-- octane benchmark -->
aoqi@0 708 <target name="get-octane" depends="init" unless="${test-sys-prop.external.octane}">
aoqi@0 709 <!-- checkout octane benchmarks -->
aoqi@0 710 <exec executable="${svn.executable}">
aoqi@0 711 <arg value="--non-interactive"/>
aoqi@0 712 <arg value="--trust-server-cert"/>
aoqi@0 713 <arg value="checkout"/>
aoqi@0 714 <arg value="http://octane-benchmark.googlecode.com/svn/trunk/"/>
aoqi@0 715 <arg value="${test.external.dir}/octane"/>
aoqi@0 716 </exec>
aoqi@0 717 </target>
aoqi@0 718 <target name="update-octane" depends="init" if="${test-sys-prop.external.octane}">
aoqi@0 719 <!-- update octane benchmarks -->
aoqi@0 720 <exec executable="${svn.executable}" dir="${test.external.dir}/octane">
aoqi@0 721 <arg value="--non-interactive"/>
aoqi@0 722 <arg value="--trust-server-cert"/>
aoqi@0 723 <arg value="update"/>
aoqi@0 724 </exec>
aoqi@0 725 </target>
aoqi@0 726
aoqi@0 727 <!-- sunspider benchmark -->
aoqi@0 728 <target name="get-sunspider" depends="init" unless="${test-sys-prop.external.sunspider}">
aoqi@0 729 <!-- checkout sunspider -->
aoqi@0 730 <exec executable="${svn.executable}">
aoqi@0 731 <arg value="--non-interactive"/>
aoqi@0 732 <arg value="--trust-server-cert"/>
aoqi@0 733 <arg value="checkout"/>
aoqi@0 734 <arg value="http://svn.webkit.org/repository/webkit/trunk/PerformanceTests/SunSpider"/>
aoqi@0 735 <arg value="${test.external.dir}/sunspider"/>
aoqi@0 736 </exec>
aoqi@0 737 </target>
aoqi@0 738 <target name="update-sunspider" depends="init" if="${test-sys-prop.external.sunspider}">
aoqi@0 739 <!-- update sunspider -->
aoqi@0 740 <exec executable="${svn.executable}" dir="${test.external.dir}/sunspider">
aoqi@0 741 <arg value="--non-interactive"/>
aoqi@0 742 <arg value="--trust-server-cert"/>
aoqi@0 743 <arg value="update"/>
aoqi@0 744 </exec>
aoqi@0 745 </target>
aoqi@0 746
aoqi@0 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">
aoqi@0 749 <!-- make external test dir -->
aoqi@0 750 <mkdir dir="${test.external.dir}"/>
aoqi@0 751
aoqi@0 752 <!-- jquery -->
aoqi@0 753 <mkdir dir="${test.external.dir}/jquery"/>
aoqi@0 754 <get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
aoqi@0 755 <get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
aoqi@0 756
aoqi@0 757 <!-- prototype -->
aoqi@0 758 <mkdir dir="${test.external.dir}/prototype"/>
aoqi@0 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"/>
aoqi@0 760
aoqi@0 761 <!-- underscorejs -->
aoqi@0 762 <mkdir dir="${test.external.dir}/underscore"/>
aoqi@0 763 <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
aoqi@0 764 <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
aoqi@0 765
aoqi@0 766 <!-- yui -->
aoqi@0 767 <mkdir dir="${test.external.dir}/yui"/>
aoqi@0 768 <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
aoqi@0 769 <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
aoqi@0 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
aoqi@0 776 </target>
aoqi@0 777
aoqi@0 778 <!-- update external test suites that are pulled from source control systems -->
aoqi@0 779 <target name="update-externals" depends="init, check-external-tests, update-test262, update-octane, update-sunspider"/>
aoqi@0 780
aoqi@0 781 <!-- run all perf tests -->
aoqi@0 782 <target name="perf" depends="externals, update-externals, sunspider, octane"/>
aoqi@0 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>
aoqi@0 792 </target>
aoqi@0 793
mhaupt@1392 794 <!-- run all tests -->
mhaupt@1392 795 <target name="alltests" depends="get-testng, externals, update-externals, test, test262parallel, testmarkdown, perf"/>
aoqi@0 796
attila@963 797 <import file="build-benchmark.xml"/>
attila@963 798
aoqi@0 799 </project>

mercurial