make/build.xml

Wed, 20 Aug 2014 10:26:01 +0200

author
attila
date
Wed, 20 Aug 2014 10:26:01 +0200
changeset 963
e2497b11a021
parent 870
ba5b790ed0f5
child 966
620bf937f377
permissions
-rw-r--r--

8027043: Turn global accesses into MethodHandle.constant, with one chance of reassignment, e.g. x = value occuring once in the global scope is ok, twice is not.
8027958: NASHORN TEST: Create tests to test markdown javascript engine work with Nashorn
8028345: Remove nashorn repo "bin" scripts to avoid confusion with JDK bin launcher programs
8029090: Developers should be able to pass nashorn properties and enable/disable JFR from command line
8030169: Need regression test for bug JDK-8010731
8033105: Make sure Nashorn test harness can run zlib benchmark
8033334: Make sure that scope depth information is maintained in the RecompilableScriptFunctionDatas, to avoid unnecessary slow proto linkage when doing on demand compilation
8034206: Make parts of code pipeline reusable in order to facilitate faster warmup and faster lazy compilation.
8035820: Optimistic recompilation
8035836: Array performance improvements
8036127: Prototype filter needs to be applied to getter guard as well, not just getter
8036986: Test should check that correctly type is returned running with optimistic. If optimistic assumption was wrong we should get the right one.
8037086: Check that deoptimizing recompilations are correct
8037177: -Dnashorn.optimistic should be enabled by default, meaning that it has to be explicitly set to false to run with the jdk 8 style conservative types
8037534: Use scope types to determine optimistic types
8037572: Add more test cases to check static types
8037967: Broke the build, by commiting without saving the last review comment
8038223: Symbol trace debug output takes time
8038396: fix for the compiler expression evaluator to be more inquisitive about types
8038398: OptimisticRecompilationTest fails on staging repo nashorn/jdk9/nashorn due to test framework
8038406: Testability: as a first step of moving loggers away from the process global space, the Debug object now supports logging POJOs from log entries as an event queue, which can be introspected from test scripts. This is way better than screen scraping brittle and subject-to-change log output.
8038413: NPE in unboxInteger
8038416: Access to undefined scoped variables deoptimized too much
8038426: Move all loggers from process wide scope into Global scope
8038799: Guard and unbox boxed primitives types on setting them in Properties to avoid megamorphisism
8038945: Simplify strict undefined checks
8039044: Expand undefined intrinsics for all commutative combinators of scrict undefined checks
8039746: Transform applies to calls wherever possible, for ScriptFunctions and JSObjects.
8040024: BranchOptimizer produces bad code for NaN FP comparison
8040089: Apply to call transform was incomplete. Now passes all tests and performance is back
8040093: Make sure that optimistic splitting works in optimistic types
8040102: Remove all references to Unsafe and definition of anonymous clases from the code
8040655: When processing a RewriteException debug object, the return value has already been reset to null. We need to catch this value before that.
8041434: Add synchronization to the common global constants structure
8041625: AccessorProperty currentType must only by Object.class when non-primitive, and scoping followup problem for lazily generated with bodies
8041905: Fix apply2call bug that prevented avatar.js unit tests from running correctly
8041995: Problems when loading tree expressions with several optimistic program points when optimistically initializing ObjectNodes
8042118: Separate types from symbols
8043002: Improve performance of Nashorn equality operators
8043003: Use strongly referenced generic invokers
8043004: Reduce variability at JavaAdapter call sites
8043132: Nashorn : all tests failed with java.security.AccessControlException
8043133: Fix corner cases of JDK-8041995
8043137: Collapse long sequences of NOP in Nashorn bytecode output
8043232: Index selection of overloaded java new constructors
8043235: Type-based optimizations interfere with continuation methods
8043431: Fix yet another corner case of JDK-8041995
8043504: Octane test harness was missing argument to print_always at one callsite, causing erroneous logging
8043605: Enable history for empty property maps
8043608: Make equality tests inline better
8043611: Move timing dependent benchmark for apply2call specialization to currently_failing. It is dependent that nothing takes machine time when doing the two runs, causing spurious assertions. Suggest running octane.raytrace manually instead to verify that this works, or incorporating it in the nightly test suite
8043632: Parallelize class installation and various script fixes.
8043633: In order to remove global state outside of contexts, make sure Timing class is an instance and not a static global collection of data. Move into Context. Move -Dnashorn.timing to an official logging option.
8043956: Make code caching work with optimistic typing and lazy compilation
8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
8044102: Ensure bechmark exclude list for Octane benchmarks is in only one place, project.properties, and fix benchmark harness
8044154: Nashorn : all tests failed with java.security.AccessControlException
8044171: Make optimistic exception handlers smaller
8044502: Get rid of global optimistic flag
8044518: Ensure exceptions related to optimistic recompilation are not serializable
8044533: Deoptimizing negation produces wrong result for zero
8044534: Constant folding for unary + should produce int for boolean literals
8044760: Avoid PropertyMap duplicate for global instances
8044786: Some tests fail with non-optimistic compilation
8044803: Unnecessary restOf check
8044816: On-demand compiled top-level program doesn't need :createProgramFunction
8044851: nashorn properties leak memory
8046013: TypeError: Cannot apply "with" to non script object
8046014: MultiGlobalCompiledScript should cache :createProgramFunction handle
8046025: AccessorProperty.getGetter is not threadsafe
8046026: CompiledFunction.relinkComposableInvoker assert is being hit
8046201: Avoid repeated flattening of nested ConsStrings
8046215: Running uncompilable scripts throws NullPointerException
8046898: Make sure that lazy compilation is the default, remove redundant "enable lazy compilation" flags, added warning message if compile logging is enabled and lazy is switched off. Verified existing test suite code coverage equivalence between lazy and eager.
8046905: apply on apply is broken
8046921: Deoptimization type information peristence
8047035: (function() "hello")() crashes in Lexer with jdk9
8047057: Add a regression test for the passing test cases from JDK-8042304
8047067: all eval arguments need to be copied in Lower
8047078: Fuzzing bug discovered when ArrayLiteralNodes weren't immutable
8047166: 'do with({}) break ; while(0);' crashes in CodeGenerator
8047331: Assertion in CompiledFunction when running earley-boyer after Merge
8047357: More precise synthetic return + unreachable throw
8047359: large string size RangeError should be thrown rather than reporting negative length
8047369: Add regression tests for passing test cases of JDK-8024971
8047371: local variable declaration in TypeEvaluator should use ScriptObject.addOwnProperty instead of .set
8047728: (function(x){var o={x:0}; with(o){delete x} return o.x})() evaluates to 0 instead of undefined
8047959: bindings created for declarations in eval code are not mutable
8048009: Type info caching accidentally defeated
8048071: eval within 'with' statement does not use correct scope if with scope expression has a copy of eval
8048079: Persistent code store is broken after optimistic types merge
8048505: ScriptingFunctions.readFully couldn't handle file names represented as ConsStrings
8048586: String concatenation with optimistic types is slow
8048718: JSON.parse('{"0":0, "64":0}') throws ArrayindexOutOfBoundsException
8048869: Reduce compile time by about 5% by removing the Class.casts from the AST nodes
8049086: Minor API convenience functions on "Java" object
8049222: JSType class exposes public mutable arrays
8049223: RewriteException class exposes public mutable arrays
8049242: Explicit constructor overload selection should work with StaticClass as well
8049318: Test hideLocationProperties.js fails on Window due to backslash in path
8049524: Global object initialization via javax.script API should be minimal
8050432: javax.script.filename variable should not be enumerable with nashorn engine's ENGINE_SCOPE bindings
8050964: OptimisticTypesPersistence.java should use java.util.Date instead of java.sql.Date
8051019: Separate src and test execution sandbox directories
8051346: Test262 tests for ECMAScript 5 now in branch "es5-tests"
8051439: Wrong type calculated for ADD operator with undefined operand
8051839: GuardedInvocation needs to clone an argument
8053908: jdeps is not PATH on Mac, results in ant clean test failure on Mac
8053910: ScriptObjectMirror causing havoc with Invocation interface
8053913: Auto format caused warning in CompositeTypeBasedGuardingDynamicLinker
8054223: Nashorn: AssertionError when use __DIR__ and ScriptEngine.eval()
8054411: Add nashorn.args.prepend system property
8054503: test/script/external/test262/test/suite/ch12/12.6/12.6.4/12.6.4-2.js fails with tip
8054651: Global.initConstructor and ScriptFunction.getPrototype(Object) can have stricter types
8054898: Avoid creation of empty type info files
8054993: type info cache may be disabled for test262 and tests explicitly changing that property should use @fork
8055034: jjs exits interactive mode if exception was thrown when trying to print value of last evaluated expression
8055042: Compile-time expression evaluator was missing variables
8055107: Extension directives to turn on callsite profiling, tracing, AST print and other debug features locally
8055139: test/script/trusted/JDK-8055107.js fails with access control exception
8055186: Backport Nashorn optimistic typing to 8u repository
8055529: Clean up the bin directory
Reviewed-by: jlaskey, lagergren, sundar
Contributed-by: marcus.largergren@oracle.com, hannes.wallnoefer@oracle.com, sundararajan.athijegannathan@oracle.com

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

mercurial