annotate make/build.xml @ 1544:d46483bac1f6

Merge
author iris
date Mon, 03 Aug 2015 09:26:31 -0700
parents b27730a502c3 e25f6f6b1bdc
children 77646e19bd81
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">
jlaskey@2 150 <fileset dir="${src.dir}/jdk/nashorn/api/scripting/resources/"/>
jlaskey@2 151 </copy>
jlaskey@2 152 <copy todir="${build.classes.dir}/jdk/nashorn/internal/runtime/resources">
jlaskey@2 153 <fileset dir="${src.dir}/jdk/nashorn/internal/runtime/resources/"/>
jlaskey@2 154 </copy>
jlaskey@2 155 <copy todir="${build.classes.dir}/jdk/nashorn/tools/resources">
jlaskey@2 156 <fileset dir="${src.dir}/jdk/nashorn/tools/resources/"/>
jlaskey@2 157 </copy>
attila@89 158 <copy file="${src.dir}/jdk/internal/dynalink/support/messages.properties" todir="${build.classes.dir}/jdk/internal/dynalink/support"/>
attila@1098 159 <copy file="${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">
jlaskey@2 168 <fileset dir="${build.classes.dir}"/>
jlaskey@2 169 <manifest>
jlaskey@2 170 <attribute name="Archiver-Version" value="n/a"/>
jlaskey@2 171 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
jlaskey@2 172 <attribute name="Built-By" value="n/a"/>
jlaskey@2 173 <attribute name="Created-By" value="Ant jar task"/>
jlaskey@2 174 <section name="jdk/nashorn/">
jlaskey@2 175 <attribute name="Implementation-Title" value="${nashorn.product.name}"/>
jlaskey@2 176 <attribute name="Implementation-Version" value="${nashorn.version}"/>
jlaskey@2 177 </section>
jlaskey@2 178 </manifest>
jlaskey@2 179 </jar>
jlaskey@2 180 </target>
jlaskey@391 181
jlaskey@391 182 <target name="use-promoted-nashorn" depends="init">
jlaskey@391 183 <delete file="${dist.dir}/nashorn.jar"/>
jlaskey@391 184 <copy file="${java.home}/lib/ext/nashorn.jar" todir="${dist.dir}"/>
jlaskey@391 185 <property name="compile.suppress.jar" value="defined"/>
jlaskey@391 186 </target>
jlaskey@391 187
jlaskey@160 188 <target name="build-fxshell" depends="jar">
jlaskey@160 189 <description>Builds the javafx shell.</description>
jlaskey@160 190 <mkdir dir="${fxshell.classes.dir}"/>
jlaskey@160 191 <javac srcdir="${fxshell.dir}"
jlaskey@160 192 destdir="${fxshell.classes.dir}"
mhaupt@1271 193 classpath="${dist.jar}${path.separator}${javac.classpath}"
jlaskey@160 194 debug="${javac.debug}"
jlaskey@160 195 encoding="${javac.encoding}"
jlaskey@160 196 includeantruntime="false">
jlaskey@160 197 </javac>
jlaskey@160 198 <jar jarfile="${fxshell.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
jlaskey@160 199 <fileset dir="${fxshell.classes.dir}"/>
jlaskey@160 200 <manifest>
jlaskey@160 201 <attribute name="Archiver-Version" value="n/a"/>
jlaskey@160 202 <attribute name="Build-Jdk" value="${java.runtime.version}"/>
jlaskey@160 203 <attribute name="Built-By" value="n/a"/>
jlaskey@160 204 <attribute name="Created-By" value="Ant jar task"/>
jlaskey@160 205 <section name="jdk/nashorn/">
jlaskey@160 206 <attribute name="Implementation-Title" value="Oracle Nashorn FXShell"/>
jlaskey@160 207 <attribute name="Implementation-Version" value="${nashorn.version}"/>
jlaskey@160 208 </section>
jlaskey@160 209 </manifest>
jlaskey@160 210 </jar>
jlaskey@160 211 </target>
jlaskey@2 212
mhaupt@1342 213 <!-- generate javadoc for all Nashorn and ASM classes -->
sundar@814 214 <target name="javadoc" depends="jar">
sundar@1203 215 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
sundar@814 216 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
mhaupt@1342 217 additionalparam="-quiet" failonerror="true" useexternalfile="true">
jlaskey@2 218 <classpath>
jlaskey@2 219 <pathelement location="${build.classes.dir}"/>
jlaskey@2 220 </classpath>
jlaskey@2 221 <fileset dir="${src.dir}" includes="**/*.java"/>
sundar@9 222 <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
sundar@814 223 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
sundar@9 224 <!-- The following tags are used only in ASM sources - just ignore these -->
sundar@9 225 <tag name="label" description="label tag in ASM sources" enabled="false"/>
sundar@9 226 <tag name="linked" description="linked tag in ASM sources" enabled="false"/>
sundar@9 227 <tag name="associates" description="associates tag in ASM sources" enabled="false"/>
jlaskey@2 228 </javadoc>
jlaskey@2 229 </target>
jlaskey@2 230
mhaupt@1342 231 <!-- generate javadoc for Nashorn classes -->
mhaupt@1342 232 <target name="javadocnh" depends="jar">
mhaupt@1342 233 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
mhaupt@1342 234 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
mhaupt@1342 235 additionalparam="-quiet" failonerror="true" useexternalfile="true">
mhaupt@1342 236 <classpath>
mhaupt@1342 237 <pathelement location="${build.classes.dir}"/>
mhaupt@1342 238 </classpath>
mhaupt@1342 239 <fileset dir="${src.dir}" includes="**/*.java"/>
mhaupt@1342 240 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
mhaupt@1342 241 </javadoc>
mhaupt@1342 242 </target>
mhaupt@1342 243
sundar@814 244 <!-- generate javadoc only for nashorn extension api classes -->
sundar@814 245 <target name="javadocapi" depends="jar">
mhaupt@1342 246 <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
mhaupt@1342 247 extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
mhaupt@1342 248 additionalparam="-quiet" failonerror="true" useexternalfile="true">
sundar@814 249 <classpath>
sundar@814 250 <pathelement location="${build.classes.dir}"/>
sundar@814 251 </classpath>
sundar@814 252 <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
sundar@814 253 <link href="http://docs.oracle.com/javase/8/docs/api/"/>
sundar@814 254 </javadoc>
sundar@814 255 </target>
sundar@814 256
sundar@814 257
jlaskey@2 258 <!-- generate shell.html for shell tool documentation -->
jlaskey@2 259 <target name="shelldoc" depends="jar">
jlaskey@2 260 <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
chegar@1123 261 <jvmarg line="${boot.class.path}"/>
jlaskey@2 262 <arg value="-scripting"/>
jlaskey@2 263 <arg value="docs/genshelldoc.js"/>
jlaskey@2 264 </java>
jlaskey@2 265 </target>
jlaskey@2 266
jlaskey@2 267 <!-- generate all docs -->
jlaskey@2 268 <target name="docs" depends="javadoc, shelldoc"/>
jlaskey@2 269
jlaskey@2 270 <!-- create .zip and .tar.gz for nashorn binaries and scripts. -->
jlaskey@2 271 <target name="dist" depends="jar">
jlaskey@2 272 <zip destfile="${build.zip}" basedir=".."
jlaskey@2 273 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
jlaskey@2 274 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
jlaskey@2 275 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
jlaskey@2 276 </target>
jlaskey@2 277
jlaskey@2 278 <target name="compile-test" depends="compile, run-nasgen" if="testng.available">
jlaskey@2 279 <!-- testng task -->
jlaskey@2 280 <taskdef name="testng" classname="org.testng.TestNGAntTask"
jlaskey@2 281 classpath="${file.reference.testng.jar}"/>
jlaskey@2 282
jlaskey@2 283 <javac srcdir="${test.src.dir}"
jlaskey@2 284 destdir="${build.test.classes.dir}"
jlaskey@2 285 classpath="${javac.test.classpath}"
jlaskey@2 286 source="${javac.source}"
jlaskey@2 287 target="${javac.target}"
jlaskey@2 288 debug="${javac.debug}"
jlaskey@2 289 encoding="${javac.encoding}"
sundar@427 290 includeantruntime="false" fork="true">
sundar@1129 291 <compilerarg value="${boot.class.path}"/>
sundar@427 292 <compilerarg value="-Xlint:unchecked"/>
sundar@427 293 <compilerarg value="-Xlint:deprecation"/>
sundar@764 294 <compilerarg value="-Xdiags:verbose"/>
sundar@277 295 </javac>
sundar@76 296
sundar@551 297 <copy todir="${build.test.classes.dir}/META-INF/services">
sundar@551 298 <fileset dir="${test.src.dir}/META-INF/services/"/>
sundar@551 299 </copy>
sundar@551 300
sundar@1235 301 <copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/test/resources">
sundar@1235 302 <fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/test/resources"/>
sundar@586 303 </copy>
sundar@586 304
sundar@1235 305 <copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/test/resources">
sundar@1235 306 <fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/test/resources"/>
hannesw@761 307 </copy>
hannesw@761 308
sundar@76 309 <!-- tests that check nashorn internals and internal API -->
sundar@76 310 <jar jarfile="${nashorn.internal.tests.jar}">
sundar@135 311 <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/>
sundar@76 312 </jar>
sundar@76 313
sundar@76 314 <!-- tests that check nashorn script engine (jsr-223) API -->
sundar@76 315 <jar jarfile="${nashorn.api.tests.jar}">
sundar@135 316 <fileset dir="${build.test.classes.dir}" includes="**/api/**"/>
sundar@551 317 <fileset dir="${build.test.classes.dir}" includes="**/META-INF/**"/>
sundar@586 318 <fileset dir="${build.test.classes.dir}" includes="**/resources/*.js"/>
sundar@76 319 </jar>
sundar@76 320
jlaskey@2 321 </target>
jlaskey@2 322
attila@91 323 <target name="generate-policy-file" depends="prepare">
attila@403 324 <echo file="${build.dir}/nashorn.policy">
sundar@76 325
yan@978 326 grant codeBase "file:/${toString:dist.path}/nashorn.jar" {
sundar@804 327 permission java.security.AllPermission;
sundar@804 328 };
sundar@804 329
attila@403 330 grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" {
attila@403 331 permission java.security.AllPermission;
attila@403 332 };
jlaskey@391 333
sundar@1203 334 grant codeBase "file:/${basedir}/${nashorn.api.tests.jar}" {
sundar@1203 335 permission java.util.PropertyPermission "parserapitest.*", "read";
sundar@1203 336 permission java.util.PropertyPermission "test.*", "read";
sundar@1203 337 permission java.util.PropertyPermission "test262.*", "read";
sundar@1203 338 permission java.io.FilePermission "${basedir}/test/-","read";
sundar@1203 339 permission java.io.FilePermission "$${user.dir}", "read";
sundar@1203 340 permission java.util.PropertyPermission "user.dir", "read";
sundar@1203 341 };
sundar@1203 342
attila@403 343 grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
attila@403 344 permission java.security.AllPermission;
attila@403 345 };
sundar@935 346 //// in case of absolute path:
sundar@935 347 grant codeBase "file:/${nashorn.internal.tests.jar}" {
sundar@935 348 permission java.security.AllPermission;
sundar@935 349 };
sundar@935 350
sundar@935 351 grant codeBase "file:/${file.reference.testng.jar}" {
sundar@935 352 permission java.security.AllPermission;
sundar@935 353 };
jlaskey@2 354
attila@403 355 grant codeBase "file:/${basedir}/test/script/trusted/*" {
attila@403 356 permission java.security.AllPermission;
attila@403 357 };
jlaskey@2 358
sundar@742 359 grant codeBase "file:/${basedir}/test/script/maptests/*" {
sundar@742 360 permission java.io.FilePermission "${basedir}/test/script/maptests/*","read";
sundar@742 361 permission java.lang.RuntimePermission "nashorn.debugMode";
sundar@742 362 };
sundar@742 363
attila@403 364 grant codeBase "file:/${basedir}/test/script/basic/*" {
attila@403 365 permission java.io.FilePermission "${basedir}/test/script/-", "read";
attila@403 366 permission java.io.FilePermission "$${user.dir}", "read";
attila@403 367 permission java.util.PropertyPermission "user.dir", "read";
attila@403 368 permission java.util.PropertyPermission "nashorn.test.*", "read";
attila@403 369 };
attila@403 370
sundar@550 371 grant codeBase "file:/${basedir}/test/script/basic/parser/*" {
sundar@550 372 permission java.io.FilePermission "${basedir}/test/script/-", "read";
sundar@550 373 permission java.io.FilePermission "$${user.dir}", "read";
sundar@550 374 permission java.util.PropertyPermission "user.dir", "read";
sundar@550 375 permission java.util.PropertyPermission "nashorn.test.*", "read";
sundar@550 376 };
sundar@550 377
hannesw@997 378 grant codeBase "file:/${basedir}/test/script/basic/es6/*" {
hannesw@997 379 permission java.io.FilePermission "${basedir}/test/script/-", "read";
hannesw@997 380 permission java.io.FilePermission "$${user.dir}", "read";
hannesw@997 381 permission java.util.PropertyPermission "user.dir", "read";
hannesw@997 382 permission java.util.PropertyPermission "nashorn.test.*", "read";
hannesw@997 383 };
hannesw@997 384
attila@403 385 grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" {
attila@403 386 permission java.util.PropertyPermission "java.security.policy", "read";
attila@403 387 };
attila@457 388
attila@457 389 grant codeBase "file:/${basedir}/test/script/basic/classloader.js" {
attila@457 390 permission java.lang.RuntimePermission "nashorn.JavaReflection";
attila@457 391 };
attila@457 392
sundar@695 393 grant codeBase "file:/${basedir}/test/script/markdown.js" {
sundar@695 394 permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read";
sundar@695 395 };
sundar@695 396
attila@403 397 </echo>
jlaskey@2 398
jlaskey@2 399 <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators -->
jlaskey@2 400 <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs -->
jlaskey@2 401
jlaskey@2 402 </target>
jlaskey@2 403
jlaskey@2 404 <target name="check-external-tests">
jlaskey@2 405 <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/>
jlaskey@2 406 <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/>
jlaskey@2 407 <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/>
jlaskey@2 408 <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/>
jlaskey@2 409 <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
jlaskey@2 410 <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
jlaskey@2 411 <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/>
sundar@695 412 <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/>
jlaskey@2 413 </target>
jlaskey@2 414
jlaskey@2 415 <target name="check-testng" unless="testng.available">
mhaupt@1300 416 <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under ${test.lib} directory."/>
jlaskey@2 417 </target>
jlaskey@2 418
sundar@888 419 <!-- only to be invoked as dependency of "test" target -->
sundar@888 420 <target name="-test-classes-all" depends="jar" unless="test.class">
sundar@888 421 <fileset id="test.classes" dir="${build.test.classes.dir}">
sundar@1240 422 <include name="**/api/javaaccess/test/*Test.class"/>
sundar@1240 423 <include name="**/api/scripting/test/*Test.class"/>
sundar@1240 424 <include name="**/api/tree/test/*Test.class"/>
sundar@1240 425 <include name="**/codegen/test/*Test.class"/>
sundar@1240 426 <include name="**/parser/test/*Test.class"/>
sundar@1240 427 <include name="**/runtime/test/*Test.class"/>
sundar@1240 428 <include name="**/runtime/regexp/test/*Test.class"/>
sundar@1240 429 <include name="**/runtime/regexp/joni/test/*Test.class"/>
sundar@888 430 <include name="**/framework/*Test.class"/>
sundar@888 431 </fileset>
sundar@888 432 </target>
jlaskey@2 433
sundar@888 434 <!-- only to be invoked as dependency of "test" target -->
sundar@888 435 <target name="-test-classes-single" depends="jar" if="test.class">
sundar@888 436 <fileset id="test.classes" dir="${build.test.classes.dir}">
sundar@888 437 <include name="${test.class}*"/>
sundar@888 438 </fileset>
sundar@888 439 </target>
sundar@888 440
sundar@888 441 <!-- only to be invoked as dependency of "test" target -->
sundar@888 442 <target name="-test-nosecurity" unless="test.class">
sundar@807 443 <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}">
sundar@807 444 <include name="**/framework/ScriptTest.class"/>
sundar@807 445 </fileset>
attila@1058 446 <testng outputdir="${build.nosecurity.test.results.dir}/${testResultsSubDir}" classfilesetref="test.nosecurity.classes"
sundar@807 447 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
chegar@1123 448 <jvmarg line="${boot.class.path}"/>
sundar@935 449 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
sundar@934 450 <sysproperty key="nashorn.jar" value="${dist.dir}/nashorn.jar"/>
sundar@807 451 <propertyset>
sundar@807 452 <propertyref prefix="nashorn."/>
sundar@807 453 </propertyset>
sundar@807 454 <propertyset>
sundar@807 455 <propertyref prefix="test-sys-prop-no-security."/>
sundar@807 456 <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
sundar@807 457 </propertyset>
lagergren@1051 458 <sysproperty key="optimistic.override" value="${optimistic}"/>
sundar@807 459 <classpath>
sundar@807 460 <pathelement path="${run.test.classpath}"/>
sundar@807 461 </classpath>
sundar@807 462 </testng>
jlaskey@2 463 </target>
jlaskey@2 464
sundar@888 465 <!-- only to be invoked as dependency of "test" target -->
sundar@888 466 <target name="-test-security">
sundar@888 467 <delete dir="${build.dir}/nashorn_code_cache"/>
sundar@888 468 <property name="debug.test.jvmargs" value=""/>
attila@1058 469 <testng outputdir="${build.test.results.dir}/${testResultsSubDir}" classfilesetref="test.classes"
sundar@1203 470 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
chegar@1123 471 <jvmarg line="${boot.class.path}"/>
sundar@935 472 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
sundar@888 473 <jvmarg line="${debug.test.jvmargs}"/>
sundar@888 474 <propertyset>
sundar@888 475 <propertyref prefix="nashorn."/>
sundar@888 476 </propertyset>
sundar@888 477 <propertyset>
sundar@888 478 <propertyref prefix="test-sys-prop."/>
sundar@888 479 <mapper from="test-sys-prop.*" to="*" type="glob"/>
sundar@888 480 </propertyset>
lagergren@1051 481 <sysproperty key="optimistic.override" value="${optimistic}"/>
sundar@888 482 <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
sundar@888 483 <classpath>
sundar@888 484 <pathelement path="${run.test.classpath}"/>
sundar@888 485 </classpath>
sundar@888 486 </testng>
sundar@888 487 </target>
sundar@888 488
mhaupt@1360 489 <target name="test" depends="prepare, javadocnh, test-pessimistic, test-optimistic"/>
lagergren@1051 490
lagergren@1051 491 <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 492 <echo message="Running test suite in OPTIMISTIC mode..."/>
lagergren@1051 493 <antcall target="-test-nosecurity" inheritRefs="true">
lagergren@1051 494 <param name="optimistic" value="true"/>
attila@1058 495 <param name="testResultsSubDir" value="optimistic"/>
sundar@1203 496 </antcall>
lagergren@1051 497 <antcall target="-test-security" inheritRefs="true">
lagergren@1051 498 <param name="optimistic" value="true"/>
attila@1058 499 <param name="testResultsSubDir" value="optimistic"/>
lagergren@1051 500 </antcall>
lagergren@1051 501 </target>
lagergren@1051 502
lagergren@1051 503 <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 504 <echo message="Running test suite in PESSIMISTIC mode..."/>
lagergren@1051 505 <antcall target="-test-nosecurity" inheritRefs="true">
lagergren@1051 506 <param name="optimistic" value="false"/>
attila@1058 507 <param name="testResultsSubDir" value="pessimistic"/>
sundar@1203 508 </antcall>
lagergren@1051 509 <antcall target="-test-security" inheritRefs="true">
lagergren@1051 510 <param name="optimistic" value="false"/>
attila@1058 511 <param name="testResultsSubDir" value="pessimistic"/>
lagergren@1051 512 </antcall>
lagergren@1051 513 </target>
sundar@888 514
kshefov@637 515 <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
kshefov@637 516 <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 517 </target>
kshefov@637 518
mhaupt@1360 519 <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
kshefov@637 520 <fileset id="test.classes" dir="${build.test.classes.dir}">
kshefov@637 521 <include name="**/framework/*Test.class"/>
kshefov@637 522 </fileset>
lagergren@866 523
kshefov@637 524 <copy file="${file.reference.jfxrt.jar}" todir="dist"/>
lagergren@866 525
kshefov@666 526 <condition property="jfx.prism.order" value="-Dprism.order=j2d" else=" ">
lagergren@866 527 <not>
kshefov@666 528 <os family="mac"/>
kshefov@666 529 </not>
lagergren@866 530 </condition>
lagergren@866 531
kshefov@637 532 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
kshefov@637 533 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
slugovoy@1184 534 <jvmarg line="${boot.class.path}"/>
sundar@935 535 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
kshefov@637 536 <propertyset>
kshefov@637 537 <propertyref prefix="testjfx-test-sys-prop."/>
kshefov@637 538 <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
kshefov@637 539 </propertyset>
kshefov@666 540 <sysproperty key="test.fork.jvm.options" value="${testjfx-test-sys-prop.test.fork.jvm.options} ${jfx.prism.order}"/>
kshefov@637 541 <classpath>
kshefov@637 542 <pathelement path="${testjfx.run.test.classpath}"/>
kshefov@637 543 </classpath>
kshefov@637 544 </testng>
kshefov@637 545 </target>
lagergren@866 546
mhaupt@1360 547 <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
sundar@695 548 <fileset id="test.classes" dir="${build.test.classes.dir}">
sundar@695 549 <include name="**/framework/*Test.class"/>
sundar@695 550 </fileset>
sundar@695 551
sundar@695 552 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
sundar@695 553 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
slugovoy@1184 554 <jvmarg line="${boot.class.path}"/>
sundar@935 555 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
sundar@695 556 <propertyset>
sundar@695 557 <propertyref prefix="testmarkdown-test-sys-prop."/>
sundar@695 558 <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/>
sundar@695 559 </propertyset>
sundar@695 560 <classpath>
sundar@695 561 <pathelement path="${run.test.classpath}"/>
sundar@695 562 </classpath>
sundar@695 563 </testng>
sundar@695 564 </target>
lagergren@866 565
mhaupt@1360 566 <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
jlaskey@2 567 <fileset id="test.classes" dir="${build.test.classes.dir}">
jlaskey@2 568 <include name="**/framework/*Test.class"/>
jlaskey@2 569 </fileset>
jlaskey@2 570
jlaskey@2 571 <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
jlaskey@2 572 verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
slugovoy@1184 573 <jvmarg line="${boot.class.path}"/>
sundar@935 574 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
jlaskey@2 575 <propertyset>
sundar@690 576 <propertyref prefix="nashorn."/>
sundar@690 577 </propertyset>
sundar@690 578 <propertyset>
jlaskey@2 579 <propertyref prefix="test262-test-sys-prop."/>
jlaskey@2 580 <mapper from="test262-test-sys-prop.*" to="*" type="glob"/>
jlaskey@2 581 </propertyset>
jlaskey@2 582 <classpath>
jlaskey@2 583 <pathelement path="${run.test.classpath}"/>
jlaskey@2 584 </classpath>
jlaskey@2 585 </testng>
jlaskey@2 586 </target>
jlaskey@2 587
jlaskey@2 588 <target name="test262parallel" depends="test262-parallel"/>
jlaskey@2 589
mhaupt@1360 590 <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
jlaskey@2 591 <!-- use just build.test.classes.dir to avoid referring to TestNG -->
sundar@86 592 <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
chegar@1123 593 <jvmarg line="${boot.class.path}"/>
sundar@935 594 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
sundar@963 595 <!-- avoid too many typeinfo cache files. Each script is run only once anyway -->
sundar@963 596 <jvmarg line="-Dnashorn.typeInfo.disabled=true"/>
sundar@86 597 <classpath>
sundar@86 598 <pathelement path="${run.test.classpath}"/>
sundar@86 599 </classpath>
jlaskey@2 600 <syspropertyset>
jlaskey@2 601 <propertyref prefix="test262-test-sys-prop."/>
jlaskey@2 602 <mapper type="glob" from="test262-test-sys-prop.*" to="*"/>
jlaskey@2 603 </syspropertyset>
jlaskey@2 604 </java>
jlaskey@2 605 </target>
jlaskey@2 606
attila@817 607 <target name="testparallel" depends="test-parallel"/>
attila@817 608
mhaupt@1360 609 <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
attila@817 610 <!-- use just build.test.classes.dir to avoid referring to TestNG -->
attila@817 611 <java classname="${parallel.test.runner}" dir="${basedir}"
lagergren@866 612 failonerror="true"
lagergren@866 613 fork="true">
chegar@1123 614 <jvmarg line="${boot.class.path}"/>
attila@817 615 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
attila@817 616 <classpath>
attila@817 617 <pathelement path="${run.test.classpath}"/>
lagergren@866 618 <pathelement path="${build.test.classes.dir}"/>
attila@817 619 </classpath>
attila@817 620 <syspropertyset>
attila@817 621 <propertyref prefix="test-sys-prop."/>
attila@817 622 <mapper type="glob" from="test-sys-prop.*" to="*"/>
attila@817 623 </syspropertyset>
attila@817 624 </java>
attila@817 625 </target>
attila@817 626
jlaskey@2 627 <target name="all" depends="test, docs"
jlaskey@2 628 description="Build, test and generate docs for nashorn"/>
jlaskey@2 629
jlaskey@2 630 <target name="run" depends="jar"
jlaskey@2 631 description="Run the shell with a sample script">
jlaskey@2 632 <java classname="${nashorn.shell.tool}" fork="true" dir="samples">
chegar@1123 633 <jvmarg line="${boot.class.path}"/>
hannesw@561 634 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
jlaskey@2 635 <arg value="-dump-on-error"/>
jlaskey@2 636 <arg value="test.js"/>
jlaskey@2 637 </java>
jlaskey@2 638 </target>
jlaskey@2 639
jlaskey@2 640 <target name="debug" depends="jar"
jlaskey@2 641 description="Debug the shell with a sample script">
jlaskey@2 642 <java classname="${nashorn.shell.tool}" fork="true" dir="samples">
chegar@1123 643 <jvmarg line="${boot.class.path}"/>
hannesw@561 644 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
jlaskey@2 645 <arg value="--print-code"/>
jlaskey@2 646 <arg value="--verify-code"/>
jlaskey@2 647 <arg value="--print-symbols"/>
jlaskey@2 648 <jvmarg value="-Dnashorn.codegen.debug=true"/>
jlaskey@2 649 <arg value="test.js"/>
jlaskey@2 650 </java>
jlaskey@2 651 </target>
sundar@18 652
sundar@18 653 <!-- targets to get external script tests -->
sundar@18 654
sundar@18 655 <!-- test262 test suite -->
sundar@18 656 <target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}">
sundar@774 657 <!-- clone test262 git repo -->
sundar@774 658 <exec executable="${git.executable}">
sundar@18 659 <arg value="clone"/>
sundar@954 660 <arg value="--branch"/>
sundar@954 661 <arg value="es5-tests"/>
sundar@774 662 <arg value="https://github.com/tc39/test262"/>
sundar@18 663 <arg value="${test.external.dir}/test262"/>
sundar@18 664 </exec>
sundar@18 665 </target>
sundar@18 666 <target name="update-test262" depends="init" if="${test-sys-prop.external.test262}">
sundar@774 667 <!-- update test262 git repo -->
sundar@774 668 <exec executable="${git.executable}" dir="${test.external.dir}/test262">
sundar@18 669 <arg value="pull"/>
sundar@18 670 </exec>
sundar@18 671 </target>
sundar@18 672
sundar@18 673 <!-- octane benchmark -->
sundar@18 674 <target name="get-octane" depends="init" unless="${test-sys-prop.external.octane}">
sundar@18 675 <!-- checkout octane benchmarks -->
sundar@18 676 <exec executable="${svn.executable}">
sundar@18 677 <arg value="--non-interactive"/>
sundar@18 678 <arg value="--trust-server-cert"/>
sundar@18 679 <arg value="checkout"/>
sundar@18 680 <arg value="http://octane-benchmark.googlecode.com/svn/trunk/"/>
sundar@18 681 <arg value="${test.external.dir}/octane"/>
sundar@18 682 </exec>
sundar@18 683 </target>
sundar@18 684 <target name="update-octane" depends="init" if="${test-sys-prop.external.octane}">
sundar@18 685 <!-- update octane benchmarks -->
sundar@18 686 <exec executable="${svn.executable}" dir="${test.external.dir}/octane">
sundar@18 687 <arg value="--non-interactive"/>
sundar@18 688 <arg value="--trust-server-cert"/>
sundar@18 689 <arg value="update"/>
sundar@18 690 </exec>
sundar@18 691 </target>
sundar@18 692
sundar@18 693 <!-- sunspider benchmark -->
sundar@18 694 <target name="get-sunspider" depends="init" unless="${test-sys-prop.external.sunspider}">
sundar@18 695 <!-- checkout sunspider -->
sundar@18 696 <exec executable="${svn.executable}">
sundar@18 697 <arg value="--non-interactive"/>
sundar@18 698 <arg value="--trust-server-cert"/>
sundar@18 699 <arg value="checkout"/>
sundar@18 700 <arg value="http://svn.webkit.org/repository/webkit/trunk/PerformanceTests/SunSpider"/>
sundar@18 701 <arg value="${test.external.dir}/sunspider"/>
sundar@18 702 </exec>
sundar@18 703 </target>
sundar@18 704 <target name="update-sunspider" depends="init" if="${test-sys-prop.external.sunspider}">
sundar@18 705 <!-- update sunspider -->
sundar@18 706 <exec executable="${svn.executable}" dir="${test.external.dir}/sunspider">
sundar@18 707 <arg value="--non-interactive"/>
sundar@18 708 <arg value="--trust-server-cert"/>
sundar@18 709 <arg value="update"/>
sundar@18 710 </exec>
sundar@18 711 </target>
sundar@18 712
sundar@18 713 <!-- get all external test scripts -->
mhaupt@1360 714 <target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider">
sundar@18 715 <!-- make external test dir -->
jlaskey@391 716 <mkdir dir="${test.external.dir}"/>
sundar@18 717
sundar@18 718 <!-- jquery -->
jlaskey@391 719 <mkdir dir="${test.external.dir}/jquery"/>
sundar@18 720 <get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
sundar@18 721 <get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
sundar@18 722
sundar@18 723 <!-- prototype -->
jlaskey@391 724 <mkdir dir="${test.external.dir}/prototype"/>
sundar@18 725 <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 726
sundar@18 727 <!-- underscorejs -->
jlaskey@391 728 <mkdir dir="${test.external.dir}/underscore"/>
sundar@18 729 <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
sundar@18 730 <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
sundar@18 731
sundar@18 732 <!-- yui -->
jlaskey@391 733 <mkdir dir="${test.external.dir}/yui"/>
sundar@18 734 <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
sundar@18 735 <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 736
sundar@695 737 <!-- showdown -->
sundar@695 738 <mkdir dir="${test.external.dir}/showdown"/>
mhaupt@1299 739 <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 740 <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 741
sundar@18 742 </target>
sundar@18 743
sundar@18 744 <!-- update external test suites that are pulled from source control systems -->
sundar@25 745 <target name="update-externals" depends="init, check-external-tests, update-test262, update-octane, update-sunspider"/>
sundar@25 746
sundar@25 747 <!-- run all perf tests -->
sundar@25 748 <target name="perf" depends="externals, update-externals, sunspider, octane"/>
sundar@25 749
mhaupt@1300 750 <!-- download and install testng.jar -->
mhaupt@1360 751 <target name="get-testng" unless="testng.already.present">
mhaupt@1300 752 <get src="http://testng.org/testng-6.8.zip" dest="${test.lib}" skipexisting="true" ignoreerrors="true"/>
mhaupt@1300 753 <unzip src="${test.lib}${file.separator}testng-6.8.zip" dest="${test.lib}">
mhaupt@1300 754 <patternset>
mhaupt@1300 755 <include name="testng-6.8/testng-6.8.jar"/>
mhaupt@1300 756 </patternset>
mhaupt@1300 757 </unzip>
mhaupt@1300 758 <move file="${test.lib}${file.separator}testng-6.8${file.separator}testng-6.8.jar" tofile="${test.lib}${file.separator}testng.jar"/>
mhaupt@1300 759 <delete dir="${test.lib}${file.separator}testng-6.8"/>
mhaupt@1300 760 </target>
mhaupt@1300 761
mhaupt@1301 762 <!-- run all tests -->
mhaupt@1360 763 <target name="alltests" depends="externals, update-externals, test, test262parallel, testmarkdown, perf"/>
sundar@18 764
lagergren@865 765 <import file="build-benchmark.xml"/>
lagergren@865 766
jlaskey@2 767 </project>