Thu, 09 Oct 2014 10:19:24 +0200
8059811: Turn off optimistic typing by default and add both ant test-pessimistic and ant test-optimistic sub-test suites.
Reviewed-by: attila, shade, hannesw
jlaskey@3 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
attila@963 | 2 | |
jlaskey@3 | 3 | <!-- |
jlaskey@7 | 4 | Copyright (c) 2010, 2013, 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="${toString:nashorn.ext.path}""/> |
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> |
attila@288 | 52 | <!-- check if JDK already has ASM classes --> |
attila@288 | 53 | <available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/> |
sundar@26 | 54 | <!-- check if testng.jar is avaiable --> |
sundar@26 | 55 | <available property="testng.available" file="${file.reference.testng.jar}"/> |
kshefov@638 | 56 | <!-- check if Jemmy ang testng.jar are avaiable --> |
kshefov@638 | 57 | <condition property="jemmy.jfx.testng.available" value="true"> |
attila@963 | 58 | <and> |
kshefov@638 | 59 | <available file="${file.reference.jemmyfx.jar}"/> |
kshefov@638 | 60 | <available file="${file.reference.jemmycore.jar}"/> |
kshefov@638 | 61 | <available file="${file.reference.jemmyawtinput.jar}"/> |
kshefov@638 | 62 | <available file="${file.reference.jfxrt.jar}"/> |
kshefov@638 | 63 | <isset property="testng.available"/> |
kshefov@638 | 64 | </and> |
kshefov@638 | 65 | </condition> |
lagergren@111 | 66 | |
hannesw@474 | 67 | <!-- enable/disable make code coverage --> |
hannesw@474 | 68 | <condition property="cc.enabled"> |
hannesw@474 | 69 | <istrue value="${make.code.coverage}" /> |
hannesw@474 | 70 | </condition> |
jlaskey@453 | 71 | |
jlaskey@453 | 72 | <!-- exclude tests in exclude lists --> |
jlaskey@453 | 73 | <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt"> |
jlaskey@453 | 74 | <istrue value="${make.code.coverage}" /> |
jlaskey@453 | 75 | </condition> |
attila@963 | 76 | |
attila@963 | 77 | <condition property="jfr.options" value="${run.test.jvmargs.jfr}" else=""> |
attila@963 | 78 | <istrue value="${jfr}"/> |
attila@963 | 79 | </condition> |
lagergren@111 | 80 | </target> |
lagergren@1036 | 81 | |
lagergren@111 | 82 | <target name="init" depends="init-conditions, init-cc"> |
hannesw@474 | 83 | <!-- extends jvm args --> |
attila@963 | 84 | <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/> |
attila@963 | 85 | <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs} ${jfr.options}"/> |
lagergren@111 | 86 | |
lagergren@111 | 87 | <echo message="run.test.jvmargs=${run.test.jvmargs}"/> |
lagergren@111 | 88 | <echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/> |
hannesw@562 | 89 | <echo message="run.test.xms=${run.test.xms}"/> |
hannesw@562 | 90 | <echo message="run.test.xmx=${run.test.xmx}"/> |
lagergren@111 | 91 | |
jlaskey@3 | 92 | </target> |
jlaskey@3 | 93 | |
jlaskey@3 | 94 | <target name="prepare" depends="init"> |
jlaskey@3 | 95 | <mkdir dir="${build.dir}"/> |
jlaskey@3 | 96 | <mkdir dir="${build.classes.dir}"/> |
jlaskey@3 | 97 | <mkdir dir="${build.classes.dir}/META-INF/services"/> |
jlaskey@3 | 98 | <mkdir dir="${build.test.classes.dir}"/> |
jlaskey@3 | 99 | <mkdir dir="${dist.dir}"/> |
jlaskey@3 | 100 | <mkdir dir="${dist.javadoc.dir}"/> |
jlaskey@3 | 101 | </target> |
jlaskey@3 | 102 | |
lagergren@111 | 103 | <target name="clean" depends="init, clean-nasgen, init-cc-cleanup"> |
jlaskey@3 | 104 | <delete includeemptydirs="true"> |
attila@90 | 105 | <fileset dir="${build.dir}" erroronmissingdir="false"/> |
jlaskey@3 | 106 | </delete> |
jlaskey@3 | 107 | <delete dir="${dist.dir}"/> |
jlaskey@3 | 108 | </target> |
jlaskey@3 | 109 | |
attila@288 | 110 | <!-- do it only if ASM is not available --> |
attila@288 | 111 | <target name="compile-asm" depends="prepare" unless="asm.available"> |
attila@288 | 112 | <javac srcdir="${jdk.asm.src.dir}" |
attila@288 | 113 | destdir="${build.classes.dir}" |
attila@288 | 114 | excludes="**/optimizer/* **/xml/* **/attrs/*" |
attila@288 | 115 | source="${javac.source}" |
attila@288 | 116 | target="${javac.target}" |
attila@288 | 117 | debug="${javac.debug}" |
attila@288 | 118 | encoding="${javac.encoding}" |
attila@288 | 119 | includeantruntime="false"/> |
attila@288 | 120 | </target> |
attila@288 | 121 | |
attila@288 | 122 | <target name="compile" depends="compile-asm" description="Compiles nashorn"> |
jlaskey@3 | 123 | <javac srcdir="${src.dir}" |
jlaskey@3 | 124 | destdir="${build.classes.dir}" |
jlaskey@3 | 125 | classpath="${javac.classpath}" |
jlaskey@3 | 126 | source="${javac.source}" |
jlaskey@3 | 127 | target="${javac.target}" |
jlaskey@3 | 128 | debug="${javac.debug}" |
jlaskey@3 | 129 | encoding="${javac.encoding}" |
sundar@414 | 130 | includeantruntime="false" fork="true"> |
sundar@414 | 131 | <compilerarg value="-J-Djava.ext.dirs="/> |
attila@963 | 132 | <compilerarg value="-Xlint:all"/> |
jlaskey@3 | 133 | <compilerarg value="-XDignore.symbol.file"/> |
sundar@771 | 134 | <compilerarg value="-Xdiags:verbose"/> |
jlaskey@3 | 135 | </javac> |
jlaskey@3 | 136 | <copy todir="${build.classes.dir}/META-INF/services"> |
jlaskey@3 | 137 | <fileset dir="${meta.inf.dir}/services/"/> |
jlaskey@3 | 138 | </copy> |
jlaskey@3 | 139 | <copy todir="${build.classes.dir}/jdk/nashorn/api/scripting/resources"> |
jlaskey@3 | 140 | <fileset dir="${src.dir}/jdk/nashorn/api/scripting/resources/"/> |
jlaskey@3 | 141 | </copy> |
jlaskey@3 | 142 | <copy todir="${build.classes.dir}/jdk/nashorn/internal/runtime/resources"> |
jlaskey@3 | 143 | <fileset dir="${src.dir}/jdk/nashorn/internal/runtime/resources/"/> |
jlaskey@3 | 144 | </copy> |
jlaskey@3 | 145 | <copy todir="${build.classes.dir}/jdk/nashorn/tools/resources"> |
jlaskey@3 | 146 | <fileset dir="${src.dir}/jdk/nashorn/tools/resources/"/> |
jlaskey@3 | 147 | </copy> |
attila@90 | 148 | <copy file="${src.dir}/jdk/internal/dynalink/support/messages.properties" todir="${build.classes.dir}/jdk/internal/dynalink/support"/> |
attila@90 | 149 | |
jlaskey@3 | 150 | <echo message="full=${nashorn.fullversion}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties"/> |
jlaskey@3 | 151 | <echo file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true">${line.separator}</echo> |
jlaskey@3 | 152 | <echo message="release=${nashorn.version}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true"/> |
jlaskey@3 | 153 | </target> |
jlaskey@3 | 154 | |
jlaskey@392 | 155 | <target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar" unless="compile.suppress.jar"> |
jlaskey@3 | 156 | <jar jarfile="${dist.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge"> |
jlaskey@3 | 157 | <fileset dir="${build.classes.dir}"/> |
jlaskey@3 | 158 | <manifest> |
jlaskey@3 | 159 | <attribute name="Archiver-Version" value="n/a"/> |
jlaskey@3 | 160 | <attribute name="Build-Jdk" value="${java.runtime.version}"/> |
jlaskey@3 | 161 | <attribute name="Built-By" value="n/a"/> |
jlaskey@3 | 162 | <attribute name="Created-By" value="Ant jar task"/> |
jlaskey@3 | 163 | <section name="jdk/nashorn/"> |
jlaskey@3 | 164 | <attribute name="Implementation-Title" value="${nashorn.product.name}"/> |
jlaskey@3 | 165 | <attribute name="Implementation-Version" value="${nashorn.version}"/> |
jlaskey@3 | 166 | </section> |
jlaskey@3 | 167 | </manifest> |
jlaskey@3 | 168 | </jar> |
jlaskey@3 | 169 | </target> |
jlaskey@392 | 170 | |
jlaskey@392 | 171 | <target name="use-promoted-nashorn" depends="init"> |
jlaskey@392 | 172 | <delete file="${dist.dir}/nashorn.jar"/> |
jlaskey@392 | 173 | <copy file="${java.home}/lib/ext/nashorn.jar" todir="${dist.dir}"/> |
jlaskey@392 | 174 | <property name="compile.suppress.jar" value="defined"/> |
jlaskey@392 | 175 | </target> |
jlaskey@392 | 176 | |
jlaskey@161 | 177 | <target name="build-fxshell" depends="jar"> |
jlaskey@161 | 178 | <description>Builds the javafx shell.</description> |
jlaskey@161 | 179 | <mkdir dir="${fxshell.classes.dir}"/> |
jlaskey@161 | 180 | <javac srcdir="${fxshell.dir}" |
jlaskey@161 | 181 | destdir="${fxshell.classes.dir}" |
jlaskey@161 | 182 | classpath="${dist.jar}:${javac.classpath}" |
jlaskey@161 | 183 | debug="${javac.debug}" |
jlaskey@161 | 184 | encoding="${javac.encoding}" |
jlaskey@161 | 185 | includeantruntime="false"> |
jlaskey@161 | 186 | </javac> |
jlaskey@161 | 187 | <jar jarfile="${fxshell.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge"> |
jlaskey@161 | 188 | <fileset dir="${fxshell.classes.dir}"/> |
jlaskey@161 | 189 | <manifest> |
jlaskey@161 | 190 | <attribute name="Archiver-Version" value="n/a"/> |
jlaskey@161 | 191 | <attribute name="Build-Jdk" value="${java.runtime.version}"/> |
jlaskey@161 | 192 | <attribute name="Built-By" value="n/a"/> |
jlaskey@161 | 193 | <attribute name="Created-By" value="Ant jar task"/> |
jlaskey@161 | 194 | <section name="jdk/nashorn/"> |
jlaskey@161 | 195 | <attribute name="Implementation-Title" value="Oracle Nashorn FXShell"/> |
jlaskey@161 | 196 | <attribute name="Implementation-Version" value="${nashorn.version}"/> |
jlaskey@161 | 197 | </section> |
jlaskey@161 | 198 | </manifest> |
jlaskey@161 | 199 | </jar> |
jlaskey@161 | 200 | </target> |
jlaskey@3 | 201 | |
sundar@864 | 202 | <target name="javadoc" depends="jar"> |
sundar@864 | 203 | <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html" |
sundar@864 | 204 | extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}" |
sundar@864 | 205 | additionalparam="-quiet" failonerror="true"> |
jlaskey@3 | 206 | <classpath> |
jlaskey@3 | 207 | <pathelement location="${build.classes.dir}"/> |
jlaskey@3 | 208 | </classpath> |
jlaskey@3 | 209 | <fileset dir="${src.dir}" includes="**/*.java"/> |
sundar@10 | 210 | <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/> |
sundar@864 | 211 | <link href="http://docs.oracle.com/javase/8/docs/api/"/> |
sundar@10 | 212 | <!-- The following tags are used only in ASM sources - just ignore these --> |
sundar@10 | 213 | <tag name="label" description="label tag in ASM sources" enabled="false"/> |
sundar@10 | 214 | <tag name="linked" description="linked tag in ASM sources" enabled="false"/> |
sundar@10 | 215 | <tag name="associates" description="associates tag in ASM sources" enabled="false"/> |
jlaskey@3 | 216 | </javadoc> |
jlaskey@3 | 217 | </target> |
jlaskey@3 | 218 | |
sundar@864 | 219 | <!-- generate javadoc only for nashorn extension api classes --> |
sundar@864 | 220 | <target name="javadocapi" depends="jar"> |
sundar@864 | 221 | <javadoc destdir="${dist.javadoc.dir}" use="yes" extdirs="${nashorn.ext.path}" |
sundar@864 | 222 | windowtitle="${nashorn.product.name}" additionalparam="-quiet" failonerror="true"> |
sundar@864 | 223 | <classpath> |
sundar@864 | 224 | <pathelement location="${build.classes.dir}"/> |
sundar@864 | 225 | </classpath> |
sundar@864 | 226 | <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/> |
sundar@864 | 227 | <link href="http://docs.oracle.com/javase/8/docs/api/"/> |
sundar@864 | 228 | </javadoc> |
sundar@864 | 229 | </target> |
sundar@864 | 230 | |
sundar@864 | 231 | |
jlaskey@3 | 232 | <!-- generate shell.html for shell tool documentation --> |
jlaskey@3 | 233 | <target name="shelldoc" depends="jar"> |
jlaskey@3 | 234 | <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true"> |
jlaskey@3 | 235 | <jvmarg line="${ext.class.path}"/> |
jlaskey@3 | 236 | <arg value="-scripting"/> |
jlaskey@3 | 237 | <arg value="docs/genshelldoc.js"/> |
jlaskey@3 | 238 | </java> |
jlaskey@3 | 239 | </target> |
jlaskey@3 | 240 | |
jlaskey@3 | 241 | <!-- generate all docs --> |
jlaskey@3 | 242 | <target name="docs" depends="javadoc, shelldoc"/> |
jlaskey@3 | 243 | |
jlaskey@3 | 244 | <!-- create .zip and .tar.gz for nashorn binaries and scripts. --> |
jlaskey@3 | 245 | <target name="dist" depends="jar"> |
jlaskey@3 | 246 | <zip destfile="${build.zip}" basedir=".." |
jlaskey@3 | 247 | excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/> |
jlaskey@3 | 248 | <tar destfile="${build.gzip}" basedir=".." compression="gzip" |
jlaskey@3 | 249 | excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/> |
jlaskey@3 | 250 | </target> |
jlaskey@3 | 251 | |
jlaskey@3 | 252 | <target name="compile-test" depends="compile, run-nasgen" if="testng.available"> |
jlaskey@3 | 253 | <!-- testng task --> |
jlaskey@3 | 254 | <taskdef name="testng" classname="org.testng.TestNGAntTask" |
jlaskey@3 | 255 | classpath="${file.reference.testng.jar}"/> |
jlaskey@3 | 256 | |
jlaskey@3 | 257 | <javac srcdir="${test.src.dir}" |
jlaskey@3 | 258 | destdir="${build.test.classes.dir}" |
jlaskey@3 | 259 | classpath="${javac.test.classpath}" |
jlaskey@3 | 260 | source="${javac.source}" |
jlaskey@3 | 261 | target="${javac.target}" |
jlaskey@3 | 262 | debug="${javac.debug}" |
jlaskey@3 | 263 | encoding="${javac.encoding}" |
sundar@428 | 264 | includeantruntime="false" fork="true"> |
sundar@428 | 265 | <compilerarg value="-J-Djava.ext.dirs="/> |
sundar@428 | 266 | <compilerarg value="-Xlint:unchecked"/> |
sundar@428 | 267 | <compilerarg value="-Xlint:deprecation"/> |
sundar@771 | 268 | <compilerarg value="-Xdiags:verbose"/> |
sundar@278 | 269 | </javac> |
sundar@77 | 270 | |
sundar@552 | 271 | <copy todir="${build.test.classes.dir}/META-INF/services"> |
sundar@552 | 272 | <fileset dir="${test.src.dir}/META-INF/services/"/> |
sundar@552 | 273 | </copy> |
sundar@552 | 274 | |
sundar@587 | 275 | <copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/resources"> |
sundar@587 | 276 | <fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/resources"/> |
sundar@587 | 277 | </copy> |
sundar@587 | 278 | |
hannesw@769 | 279 | <copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/resources"> |
hannesw@769 | 280 | <fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/resources"/> |
hannesw@769 | 281 | </copy> |
hannesw@769 | 282 | |
sundar@77 | 283 | <!-- tests that check nashorn internals and internal API --> |
sundar@77 | 284 | <jar jarfile="${nashorn.internal.tests.jar}"> |
sundar@136 | 285 | <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/> |
sundar@77 | 286 | </jar> |
sundar@77 | 287 | |
sundar@77 | 288 | <!-- tests that check nashorn script engine (jsr-223) API --> |
sundar@77 | 289 | <jar jarfile="${nashorn.api.tests.jar}"> |
sundar@136 | 290 | <fileset dir="${build.test.classes.dir}" includes="**/api/**"/> |
sundar@552 | 291 | <fileset dir="${build.test.classes.dir}" includes="**/META-INF/**"/> |
sundar@587 | 292 | <fileset dir="${build.test.classes.dir}" includes="**/resources/*.js"/> |
sundar@77 | 293 | </jar> |
sundar@77 | 294 | |
jlaskey@3 | 295 | </target> |
jlaskey@3 | 296 | |
attila@92 | 297 | <target name="generate-policy-file" depends="prepare"> |
attila@404 | 298 | <echo file="${build.dir}/nashorn.policy"> |
sundar@77 | 299 | |
yan@984 | 300 | grant codeBase "file:/${toString:dist.path}/nashorn.jar" { |
attila@963 | 301 | permission java.security.AllPermission; |
attila@963 | 302 | }; |
attila@963 | 303 | |
attila@404 | 304 | grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" { |
attila@404 | 305 | permission java.security.AllPermission; |
attila@404 | 306 | }; |
jlaskey@392 | 307 | |
attila@404 | 308 | grant codeBase "file:/${basedir}/${file.reference.testng.jar}" { |
attila@404 | 309 | permission java.security.AllPermission; |
attila@404 | 310 | }; |
attila@963 | 311 | //// in case of absolute path: |
attila@963 | 312 | grant codeBase "file:/${nashorn.internal.tests.jar}" { |
attila@963 | 313 | permission java.security.AllPermission; |
attila@963 | 314 | }; |
attila@963 | 315 | |
attila@963 | 316 | grant codeBase "file:/${file.reference.testng.jar}" { |
attila@963 | 317 | permission java.security.AllPermission; |
attila@963 | 318 | }; |
jlaskey@3 | 319 | |
attila@404 | 320 | grant codeBase "file:/${basedir}/test/script/trusted/*" { |
attila@404 | 321 | permission java.security.AllPermission; |
attila@404 | 322 | }; |
jlaskey@3 | 323 | |
sundar@762 | 324 | grant codeBase "file:/${basedir}/test/script/maptests/*" { |
sundar@762 | 325 | permission java.io.FilePermission "${basedir}/test/script/maptests/*","read"; |
sundar@762 | 326 | permission java.lang.RuntimePermission "nashorn.debugMode"; |
sundar@762 | 327 | }; |
sundar@762 | 328 | |
attila@404 | 329 | grant codeBase "file:/${basedir}/test/script/basic/*" { |
attila@404 | 330 | permission java.io.FilePermission "${basedir}/test/script/-", "read"; |
attila@404 | 331 | permission java.io.FilePermission "$${user.dir}", "read"; |
attila@404 | 332 | permission java.util.PropertyPermission "user.dir", "read"; |
attila@404 | 333 | permission java.util.PropertyPermission "nashorn.test.*", "read"; |
attila@404 | 334 | }; |
attila@404 | 335 | |
sundar@551 | 336 | grant codeBase "file:/${basedir}/test/script/basic/parser/*" { |
sundar@551 | 337 | permission java.io.FilePermission "${basedir}/test/script/-", "read"; |
sundar@551 | 338 | permission java.io.FilePermission "$${user.dir}", "read"; |
sundar@551 | 339 | permission java.util.PropertyPermission "user.dir", "read"; |
sundar@551 | 340 | permission java.util.PropertyPermission "nashorn.test.*", "read"; |
sundar@551 | 341 | }; |
sundar@551 | 342 | |
hannesw@991 | 343 | grant codeBase "file:/${basedir}/test/script/basic/es6/*" { |
hannesw@991 | 344 | permission java.io.FilePermission "${basedir}/test/script/-", "read"; |
hannesw@991 | 345 | permission java.io.FilePermission "$${user.dir}", "read"; |
hannesw@991 | 346 | permission java.util.PropertyPermission "user.dir", "read"; |
hannesw@991 | 347 | permission java.util.PropertyPermission "nashorn.test.*", "read"; |
hannesw@991 | 348 | }; |
hannesw@991 | 349 | |
attila@404 | 350 | grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" { |
attila@404 | 351 | permission java.util.PropertyPermission "java.security.policy", "read"; |
attila@404 | 352 | }; |
attila@458 | 353 | |
attila@458 | 354 | grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { |
attila@458 | 355 | permission java.lang.RuntimePermission "nashorn.JavaReflection"; |
attila@458 | 356 | }; |
attila@458 | 357 | |
attila@963 | 358 | grant codeBase "file:/${basedir}/test/script/markdown.js" { |
attila@963 | 359 | permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read"; |
attila@963 | 360 | }; |
attila@963 | 361 | |
attila@404 | 362 | </echo> |
jlaskey@3 | 363 | |
jlaskey@3 | 364 | <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators --> |
jlaskey@3 | 365 | <replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs --> |
jlaskey@3 | 366 | |
jlaskey@3 | 367 | </target> |
jlaskey@3 | 368 | |
jlaskey@3 | 369 | <target name="check-external-tests"> |
jlaskey@3 | 370 | <available file="${test.external.dir}/prototype" property="test-sys-prop.external.prototype"/> |
jlaskey@3 | 371 | <available file="${test.external.dir}/sunspider" property="test-sys-prop.external.sunspider"/> |
jlaskey@3 | 372 | <available file="${test.external.dir}/underscore" property="test-sys-prop.external.underscore"/> |
jlaskey@3 | 373 | <available file="${test.external.dir}/octane" property="test-sys-prop.external.octane"/> |
jlaskey@3 | 374 | <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/> |
jlaskey@3 | 375 | <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/> |
jlaskey@3 | 376 | <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/> |
attila@963 | 377 | <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/> |
jlaskey@3 | 378 | </target> |
jlaskey@3 | 379 | |
jlaskey@3 | 380 | <target name="check-testng" unless="testng.available"> |
jlaskey@3 | 381 | <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/> |
jlaskey@3 | 382 | </target> |
jlaskey@3 | 383 | |
sundar@870 | 384 | <!-- only to be invoked as dependency of "test" target --> |
sundar@870 | 385 | <target name="-test-classes-all" depends="jar" unless="test.class"> |
sundar@870 | 386 | <fileset id="test.classes" dir="${build.test.classes.dir}"> |
sundar@870 | 387 | <include name="**/api/javaaccess/*Test.class"/> |
sundar@870 | 388 | <include name="**/api/scripting/*Test.class"/> |
sundar@870 | 389 | <include name="**/codegen/*Test.class"/> |
sundar@870 | 390 | <include name="**/parser/*Test.class"/> |
sundar@870 | 391 | <include name="**/runtime/*Test.class"/> |
sundar@870 | 392 | <include name="**/runtime/regexp/*Test.class"/> |
sundar@870 | 393 | <include name="**/runtime/regexp/joni/*Test.class"/> |
sundar@870 | 394 | <include name="**/framework/*Test.class"/> |
sundar@870 | 395 | </fileset> |
sundar@870 | 396 | </target> |
jlaskey@3 | 397 | |
sundar@870 | 398 | <!-- only to be invoked as dependency of "test" target --> |
sundar@870 | 399 | <target name="-test-classes-single" depends="jar" if="test.class"> |
sundar@870 | 400 | <fileset id="test.classes" dir="${build.test.classes.dir}"> |
sundar@870 | 401 | <include name="${test.class}*"/> |
sundar@870 | 402 | </fileset> |
sundar@870 | 403 | </target> |
sundar@870 | 404 | |
sundar@870 | 405 | <!-- only to be invoked as dependency of "test" target --> |
sundar@870 | 406 | <target name="-test-nosecurity" unless="test.class"> |
sundar@855 | 407 | <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}"> |
sundar@855 | 408 | <include name="**/framework/ScriptTest.class"/> |
sundar@855 | 409 | </fileset> |
sundar@855 | 410 | <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes" |
sundar@855 | 411 | verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> |
sundar@855 | 412 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 413 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/> |
attila@963 | 414 | <sysproperty key="nashorn.jar" value="${dist.dir}/nashorn.jar"/> |
sundar@855 | 415 | <propertyset> |
sundar@855 | 416 | <propertyref prefix="nashorn."/> |
sundar@855 | 417 | </propertyset> |
sundar@855 | 418 | <propertyset> |
sundar@855 | 419 | <propertyref prefix="test-sys-prop-no-security."/> |
sundar@855 | 420 | <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/> |
sundar@855 | 421 | </propertyset> |
lagergren@1036 | 422 | <sysproperty key="optimistic.override" value="${optimistic}"/> |
sundar@855 | 423 | <classpath> |
sundar@855 | 424 | <pathelement path="${run.test.classpath}"/> |
sundar@855 | 425 | </classpath> |
sundar@855 | 426 | </testng> |
jlaskey@3 | 427 | </target> |
jlaskey@3 | 428 | |
sundar@870 | 429 | <!-- only to be invoked as dependency of "test" target --> |
sundar@870 | 430 | <target name="-test-security"> |
sundar@870 | 431 | <delete dir="${build.dir}/nashorn_code_cache"/> |
sundar@870 | 432 | <property name="debug.test.jvmargs" value=""/> |
sundar@870 | 433 | <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" |
lagergren@1036 | 434 | verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> |
sundar@870 | 435 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 436 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/> |
sundar@870 | 437 | <jvmarg line="${debug.test.jvmargs}"/> |
sundar@870 | 438 | <propertyset> |
attila@963 | 439 | <propertyref prefix="nashorn."/> |
attila@963 | 440 | </propertyset> |
attila@963 | 441 | <propertyset> |
sundar@870 | 442 | <propertyref prefix="test-sys-prop."/> |
sundar@870 | 443 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
sundar@870 | 444 | </propertyset> |
lagergren@1036 | 445 | <sysproperty key="optimistic.override" value="${optimistic}"/> |
sundar@870 | 446 | <sysproperty key="test.js.excludes.file" value="${exclude.list}"/> |
sundar@870 | 447 | <classpath> |
sundar@870 | 448 | <pathelement path="${run.test.classpath}"/> |
sundar@870 | 449 | </classpath> |
sundar@870 | 450 | </testng> |
sundar@870 | 451 | </target> |
sundar@870 | 452 | |
lagergren@1036 | 453 | <target name="test" depends="test-pessimistic, test-optimistic"/> |
lagergren@1036 | 454 | |
lagergren@1036 | 455 | <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 | 456 | <echo message="Running test suite in OPTIMISTIC mode..."/> |
lagergren@1036 | 457 | <antcall target="-test-nosecurity" inheritRefs="true"> |
lagergren@1036 | 458 | <param name="optimistic" value="true"/> |
lagergren@1036 | 459 | </antcall> |
lagergren@1036 | 460 | <antcall target="-test-security" inheritRefs="true"> |
lagergren@1036 | 461 | <param name="optimistic" value="true"/> |
lagergren@1036 | 462 | </antcall> |
lagergren@1036 | 463 | </target> |
lagergren@1036 | 464 | |
lagergren@1036 | 465 | <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 | 466 | <echo message="Running test suite in PESSIMISTIC mode..."/> |
lagergren@1036 | 467 | <antcall target="-test-nosecurity" inheritRefs="true"> |
lagergren@1036 | 468 | <param name="optimistic" value="false"/> |
lagergren@1036 | 469 | </antcall> |
lagergren@1036 | 470 | <antcall target="-test-security" inheritRefs="true"> |
lagergren@1036 | 471 | <param name="optimistic" value="false"/> |
lagergren@1036 | 472 | </antcall> |
lagergren@1036 | 473 | </target> |
sundar@870 | 474 | |
kshefov@638 | 475 | <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available"> |
kshefov@638 | 476 | <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@638 | 477 | </target> |
kshefov@638 | 478 | |
kshefov@638 | 479 | <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available"> |
kshefov@638 | 480 | <fileset id="test.classes" dir="${build.test.classes.dir}"> |
kshefov@638 | 481 | <include name="**/framework/*Test.class"/> |
kshefov@638 | 482 | </fileset> |
attila@963 | 483 | |
kshefov@638 | 484 | <copy file="${file.reference.jfxrt.jar}" todir="dist"/> |
attila@963 | 485 | |
kshefov@667 | 486 | <condition property="jfx.prism.order" value="-Dprism.order=j2d" else=" "> |
attila@963 | 487 | <not> |
kshefov@667 | 488 | <os family="mac"/> |
kshefov@667 | 489 | </not> |
attila@963 | 490 | </condition> |
attila@963 | 491 | |
kshefov@638 | 492 | <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" |
kshefov@638 | 493 | verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> |
kshefov@638 | 494 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 495 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/> |
kshefov@638 | 496 | <propertyset> |
kshefov@638 | 497 | <propertyref prefix="testjfx-test-sys-prop."/> |
kshefov@638 | 498 | <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/> |
kshefov@638 | 499 | </propertyset> |
kshefov@667 | 500 | <sysproperty key="test.fork.jvm.options" value="${testjfx-test-sys-prop.test.fork.jvm.options} ${jfx.prism.order}"/> |
kshefov@638 | 501 | <classpath> |
kshefov@638 | 502 | <pathelement path="${testjfx.run.test.classpath}"/> |
kshefov@638 | 503 | </classpath> |
kshefov@638 | 504 | </testng> |
kshefov@638 | 505 | </target> |
attila@963 | 506 | |
attila@963 | 507 | <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> |
attila@963 | 508 | <fileset id="test.classes" dir="${build.test.classes.dir}"> |
attila@963 | 509 | <include name="**/framework/*Test.class"/> |
attila@963 | 510 | </fileset> |
attila@963 | 511 | |
attila@963 | 512 | <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" |
attila@963 | 513 | verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> |
attila@963 | 514 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 515 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/> |
attila@963 | 516 | <propertyset> |
attila@963 | 517 | <propertyref prefix="testmarkdown-test-sys-prop."/> |
attila@963 | 518 | <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/> |
attila@963 | 519 | </propertyset> |
attila@963 | 520 | <classpath> |
attila@963 | 521 | <pathelement path="${run.test.classpath}"/> |
attila@963 | 522 | </classpath> |
attila@963 | 523 | </testng> |
attila@963 | 524 | </target> |
attila@963 | 525 | |
sundar@87 | 526 | <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> |
jlaskey@3 | 527 | <fileset id="test.classes" dir="${build.test.classes.dir}"> |
jlaskey@3 | 528 | <include name="**/framework/*Test.class"/> |
jlaskey@3 | 529 | </fileset> |
jlaskey@3 | 530 | |
jlaskey@3 | 531 | <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" |
jlaskey@3 | 532 | verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> |
jlaskey@3 | 533 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 534 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/> |
attila@963 | 535 | <propertyset> |
attila@963 | 536 | <propertyref prefix="nashorn."/> |
attila@963 | 537 | </propertyset> |
jlaskey@3 | 538 | <propertyset> |
jlaskey@3 | 539 | <propertyref prefix="test262-test-sys-prop."/> |
jlaskey@3 | 540 | <mapper from="test262-test-sys-prop.*" to="*" type="glob"/> |
jlaskey@3 | 541 | </propertyset> |
jlaskey@3 | 542 | <classpath> |
jlaskey@3 | 543 | <pathelement path="${run.test.classpath}"/> |
jlaskey@3 | 544 | </classpath> |
jlaskey@3 | 545 | </testng> |
jlaskey@3 | 546 | </target> |
jlaskey@3 | 547 | |
jlaskey@3 | 548 | <target name="test262parallel" depends="test262-parallel"/> |
jlaskey@3 | 549 | |
sundar@87 | 550 | <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> |
jlaskey@3 | 551 | <!-- use just build.test.classes.dir to avoid referring to TestNG --> |
sundar@87 | 552 | <java classname="${parallel.test.runner}" dir="${basedir}" fork="true"> |
jlaskey@3 | 553 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 554 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/> |
attila@963 | 555 | <!-- avoid too many typeinfo cache files. Each script is run only once anyway --> |
attila@963 | 556 | <jvmarg line="-Dnashorn.typeInfo.disabled=true"/> |
sundar@87 | 557 | <classpath> |
sundar@87 | 558 | <pathelement path="${run.test.classpath}"/> |
sundar@87 | 559 | </classpath> |
jlaskey@3 | 560 | <syspropertyset> |
jlaskey@3 | 561 | <propertyref prefix="test262-test-sys-prop."/> |
jlaskey@3 | 562 | <mapper type="glob" from="test262-test-sys-prop.*" to="*"/> |
jlaskey@3 | 563 | </syspropertyset> |
jlaskey@3 | 564 | </java> |
jlaskey@3 | 565 | </target> |
jlaskey@3 | 566 | |
attila@963 | 567 | <target name="testparallel" depends="test-parallel"/> |
attila@963 | 568 | |
attila@963 | 569 | <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> |
attila@963 | 570 | <!-- use just build.test.classes.dir to avoid referring to TestNG --> |
attila@963 | 571 | <java classname="${parallel.test.runner}" dir="${basedir}" |
attila@963 | 572 | failonerror="true" |
attila@963 | 573 | fork="true"> |
attila@963 | 574 | <jvmarg line="${ext.class.path}"/> |
attila@963 | 575 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> |
attila@963 | 576 | <classpath> |
attila@963 | 577 | <pathelement path="${run.test.classpath}"/> |
attila@963 | 578 | <pathelement path="${build.test.classes.dir}"/> |
attila@963 | 579 | </classpath> |
attila@963 | 580 | <syspropertyset> |
attila@963 | 581 | <propertyref prefix="test-sys-prop."/> |
attila@963 | 582 | <mapper type="glob" from="test-sys-prop.*" to="*"/> |
attila@963 | 583 | </syspropertyset> |
attila@963 | 584 | </java> |
attila@963 | 585 | </target> |
attila@963 | 586 | |
jlaskey@3 | 587 | <target name="all" depends="test, docs" |
jlaskey@3 | 588 | description="Build, test and generate docs for nashorn"/> |
jlaskey@3 | 589 | |
jlaskey@3 | 590 | <target name="run" depends="jar" |
jlaskey@3 | 591 | description="Run the shell with a sample script"> |
jlaskey@3 | 592 | <java classname="${nashorn.shell.tool}" fork="true" dir="samples"> |
jlaskey@3 | 593 | <jvmarg line="${ext.class.path}"/> |
hannesw@562 | 594 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/> |
jlaskey@3 | 595 | <arg value="-dump-on-error"/> |
jlaskey@3 | 596 | <arg value="test.js"/> |
jlaskey@3 | 597 | </java> |
jlaskey@3 | 598 | </target> |
jlaskey@3 | 599 | |
jlaskey@3 | 600 | <target name="debug" depends="jar" |
jlaskey@3 | 601 | description="Debug the shell with a sample script"> |
jlaskey@3 | 602 | <java classname="${nashorn.shell.tool}" fork="true" dir="samples"> |
jlaskey@3 | 603 | <jvmarg line="${ext.class.path}"/> |
hannesw@562 | 604 | <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/> |
jlaskey@3 | 605 | <arg value="--print-code"/> |
jlaskey@3 | 606 | <arg value="--verify-code"/> |
jlaskey@3 | 607 | <arg value="--print-symbols"/> |
jlaskey@3 | 608 | <jvmarg value="-Dnashorn.codegen.debug=true"/> |
jlaskey@3 | 609 | <arg value="test.js"/> |
jlaskey@3 | 610 | </java> |
jlaskey@3 | 611 | </target> |
sundar@19 | 612 | |
sundar@19 | 613 | <!-- targets to get external script tests --> |
sundar@19 | 614 | |
sundar@19 | 615 | <!-- test262 test suite --> |
sundar@19 | 616 | <target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}"> |
sundar@775 | 617 | <!-- clone test262 git repo --> |
sundar@775 | 618 | <exec executable="${git.executable}"> |
sundar@19 | 619 | <arg value="clone"/> |
attila@963 | 620 | <arg value="--branch"/> |
attila@963 | 621 | <arg value="es5-tests"/> |
sundar@775 | 622 | <arg value="https://github.com/tc39/test262"/> |
sundar@19 | 623 | <arg value="${test.external.dir}/test262"/> |
sundar@19 | 624 | </exec> |
sundar@19 | 625 | </target> |
sundar@19 | 626 | <target name="update-test262" depends="init" if="${test-sys-prop.external.test262}"> |
sundar@775 | 627 | <!-- update test262 git repo --> |
sundar@775 | 628 | <exec executable="${git.executable}" dir="${test.external.dir}/test262"> |
sundar@19 | 629 | <arg value="pull"/> |
sundar@19 | 630 | </exec> |
sundar@19 | 631 | </target> |
sundar@19 | 632 | |
sundar@19 | 633 | <!-- octane benchmark --> |
sundar@19 | 634 | <target name="get-octane" depends="init" unless="${test-sys-prop.external.octane}"> |
sundar@19 | 635 | <!-- checkout octane benchmarks --> |
sundar@19 | 636 | <exec executable="${svn.executable}"> |
sundar@19 | 637 | <arg value="--non-interactive"/> |
sundar@19 | 638 | <arg value="--trust-server-cert"/> |
sundar@19 | 639 | <arg value="checkout"/> |
sundar@19 | 640 | <arg value="http://octane-benchmark.googlecode.com/svn/trunk/"/> |
sundar@19 | 641 | <arg value="${test.external.dir}/octane"/> |
sundar@19 | 642 | </exec> |
sundar@19 | 643 | </target> |
sundar@19 | 644 | <target name="update-octane" depends="init" if="${test-sys-prop.external.octane}"> |
sundar@19 | 645 | <!-- update octane benchmarks --> |
sundar@19 | 646 | <exec executable="${svn.executable}" dir="${test.external.dir}/octane"> |
sundar@19 | 647 | <arg value="--non-interactive"/> |
sundar@19 | 648 | <arg value="--trust-server-cert"/> |
sundar@19 | 649 | <arg value="update"/> |
sundar@19 | 650 | </exec> |
sundar@19 | 651 | </target> |
sundar@19 | 652 | |
sundar@19 | 653 | <!-- sunspider benchmark --> |
sundar@19 | 654 | <target name="get-sunspider" depends="init" unless="${test-sys-prop.external.sunspider}"> |
sundar@19 | 655 | <!-- checkout sunspider --> |
sundar@19 | 656 | <exec executable="${svn.executable}"> |
sundar@19 | 657 | <arg value="--non-interactive"/> |
sundar@19 | 658 | <arg value="--trust-server-cert"/> |
sundar@19 | 659 | <arg value="checkout"/> |
sundar@19 | 660 | <arg value="http://svn.webkit.org/repository/webkit/trunk/PerformanceTests/SunSpider"/> |
sundar@19 | 661 | <arg value="${test.external.dir}/sunspider"/> |
sundar@19 | 662 | </exec> |
sundar@19 | 663 | </target> |
sundar@19 | 664 | <target name="update-sunspider" depends="init" if="${test-sys-prop.external.sunspider}"> |
sundar@19 | 665 | <!-- update sunspider --> |
sundar@19 | 666 | <exec executable="${svn.executable}" dir="${test.external.dir}/sunspider"> |
sundar@19 | 667 | <arg value="--non-interactive"/> |
sundar@19 | 668 | <arg value="--trust-server-cert"/> |
sundar@19 | 669 | <arg value="update"/> |
sundar@19 | 670 | </exec> |
sundar@19 | 671 | </target> |
sundar@19 | 672 | |
sundar@19 | 673 | <!-- get all external test scripts --> |
sundar@26 | 674 | <target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider"> |
sundar@19 | 675 | <!-- make external test dir --> |
jlaskey@392 | 676 | <mkdir dir="${test.external.dir}"/> |
sundar@19 | 677 | |
sundar@19 | 678 | <!-- jquery --> |
jlaskey@392 | 679 | <mkdir dir="${test.external.dir}/jquery"/> |
sundar@19 | 680 | <get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/> |
sundar@19 | 681 | <get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/> |
sundar@19 | 682 | |
sundar@19 | 683 | <!-- prototype --> |
jlaskey@392 | 684 | <mkdir dir="${test.external.dir}/prototype"/> |
sundar@19 | 685 | <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 | 686 | |
sundar@19 | 687 | <!-- underscorejs --> |
jlaskey@392 | 688 | <mkdir dir="${test.external.dir}/underscore"/> |
sundar@19 | 689 | <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/> |
sundar@19 | 690 | <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/> |
sundar@19 | 691 | |
sundar@19 | 692 | <!-- yui --> |
jlaskey@392 | 693 | <mkdir dir="${test.external.dir}/yui"/> |
sundar@19 | 694 | <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/> |
sundar@19 | 695 | <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 | 696 | |
attila@963 | 697 | <!-- showdown --> |
attila@963 | 698 | <mkdir dir="${test.external.dir}/showdown"/> |
attila@963 | 699 | <get src="https://raw.github.com/coreyti/showdown/master/src/showdown.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/> |
attila@963 | 700 | <get src="https://raw.github.com/coreyti/showdown/master/src/extensions/table.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/> |
attila@963 | 701 | |
sundar@19 | 702 | </target> |
sundar@19 | 703 | |
sundar@19 | 704 | <!-- update external test suites that are pulled from source control systems --> |
sundar@26 | 705 | <target name="update-externals" depends="init, check-external-tests, update-test262, update-octane, update-sunspider"/> |
sundar@26 | 706 | |
sundar@26 | 707 | <!-- run all perf tests --> |
sundar@26 | 708 | <target name="perf" depends="externals, update-externals, sunspider, octane"/> |
sundar@26 | 709 | |
sundar@26 | 710 | <!-- run all tests --> |
sundar@26 | 711 | <target name="exit-if-no-testng" depends="init, check-testng" unless="${testng.available}"> |
sundar@26 | 712 | <fail message="Exiting.."/> |
sundar@26 | 713 | </target> |
sundar@26 | 714 | |
sundar@26 | 715 | <target name="alltests" depends="exit-if-no-testng, externals, update-externals, test, test262parallel, perf"/> |
sundar@19 | 716 | |
attila@963 | 717 | <import file="build-benchmark.xml"/> |
attila@963 | 718 | |
jlaskey@3 | 719 | </project> |