21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 or visit www.oracle.com if you need additional information or have any
23 questions.
24 -->
25
26 <project name="nashorn" default="test" basedir="..">
27 <import file="build-nasgen.xml"/>
28 <import file="code_coverage.xml"/>
29
30 <target name="init-conditions">
31 <!-- loading locally defined resources and properties. NB they owerwrite default ones defined later -->
32 <property file="${user.home}/.nashorn.project.local.properties"/>
33
34 <loadproperties srcFile="make/project.properties"/>
35 <path id="dist.path">
36 <pathelement location="${dist.dir}"/>
37 </path>
38 <path id="nashorn.boot.prefix.path">
39 <pathelement location="${dist.jar}"/>
40 </path>
41 <property name="boot.class.path" value="-Xbootclasspath/p:"${toString:nashorn.boot.prefix.path}""/>
42 <condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
43 <available file="/usr/local/bin/svn"/>
44 </condition>
45 <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
46 <available file="/usr/local/bin/hg"/>
47 </condition>
48 <condition property="git.executable" value="/usr/local/bin/git" else="git">
49 <available file="/usr/local/bin/git"/>
50 </condition>
51 <!-- check if testng.jar is avaiable -->
52 <available property="testng.available" file="${file.reference.testng.jar}"/>
53 <!-- check if Jemmy ang testng.jar are avaiable -->
54 <condition property="jemmy.jfx.testng.available" value="true">
55 <and>
56 <available file="${file.reference.jemmyfx.jar}"/>
57 <available file="${file.reference.jemmycore.jar}"/>
58 <available file="${file.reference.jemmyawtinput.jar}"/>
59 <available file="${file.reference.jfxrt.jar}"/>
60 <isset property="testng.available"/>
61 </and>
254 <target name="dist" depends="jar">
255 <zip destfile="${build.zip}" basedir=".."
256 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
257 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
258 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
259 </target>
260
261 <target name="compile-test" depends="compile, run-nasgen" if="testng.available">
262 <!-- testng task -->
263 <taskdef name="testng" classname="org.testng.TestNGAntTask"
264 classpath="${file.reference.testng.jar}"/>
265
266 <javac srcdir="${test.src.dir}"
267 destdir="${build.test.classes.dir}"
268 classpath="${javac.test.classpath}"
269 source="${javac.source}"
270 target="${javac.target}"
271 debug="${javac.debug}"
272 encoding="${javac.encoding}"
273 includeantruntime="false" fork="true">
274 <compilerarg value="-Xlint:unchecked"/>
275 <compilerarg value="-Xlint:deprecation"/>
276 <compilerarg value="-Xdiags:verbose"/>
277 </javac>
278
279 <copy todir="${build.test.classes.dir}/META-INF/services">
280 <fileset dir="${test.src.dir}/META-INF/services/"/>
281 </copy>
282
283 <copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/resources">
284 <fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/resources"/>
285 </copy>
286
287 <copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/resources">
288 <fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/resources"/>
289 </copy>
290
291 <!-- tests that check nashorn internals and internal API -->
292 <jar jarfile="${nashorn.internal.tests.jar}">
293 <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/>
|
21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 or visit www.oracle.com if you need additional information or have any
23 questions.
24 -->
25
26 <project name="nashorn" default="test" basedir="..">
27 <import file="build-nasgen.xml"/>
28 <import file="code_coverage.xml"/>
29
30 <target name="init-conditions">
31 <!-- loading locally defined resources and properties. NB they owerwrite default ones defined later -->
32 <property file="${user.home}/.nashorn.project.local.properties"/>
33
34 <loadproperties srcFile="make/project.properties"/>
35 <path id="dist.path">
36 <pathelement location="${dist.dir}"/>
37 </path>
38 <path id="nashorn.boot.prefix.path">
39 <pathelement location="${dist.jar}"/>
40 </path>
41 <property name="boot.class.path" value="-Xbootclasspath/p:${toString:nashorn.boot.prefix.path}"/>
42 <condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
43 <available file="/usr/local/bin/svn"/>
44 </condition>
45 <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
46 <available file="/usr/local/bin/hg"/>
47 </condition>
48 <condition property="git.executable" value="/usr/local/bin/git" else="git">
49 <available file="/usr/local/bin/git"/>
50 </condition>
51 <!-- check if testng.jar is avaiable -->
52 <available property="testng.available" file="${file.reference.testng.jar}"/>
53 <!-- check if Jemmy ang testng.jar are avaiable -->
54 <condition property="jemmy.jfx.testng.available" value="true">
55 <and>
56 <available file="${file.reference.jemmyfx.jar}"/>
57 <available file="${file.reference.jemmycore.jar}"/>
58 <available file="${file.reference.jemmyawtinput.jar}"/>
59 <available file="${file.reference.jfxrt.jar}"/>
60 <isset property="testng.available"/>
61 </and>
254 <target name="dist" depends="jar">
255 <zip destfile="${build.zip}" basedir=".."
256 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
257 <tar destfile="${build.gzip}" basedir=".." compression="gzip"
258 excludes="nashorn/bin/*.sh" includes="nashorn/bin/** nashorn/dist/**"/>
259 </target>
260
261 <target name="compile-test" depends="compile, run-nasgen" if="testng.available">
262 <!-- testng task -->
263 <taskdef name="testng" classname="org.testng.TestNGAntTask"
264 classpath="${file.reference.testng.jar}"/>
265
266 <javac srcdir="${test.src.dir}"
267 destdir="${build.test.classes.dir}"
268 classpath="${javac.test.classpath}"
269 source="${javac.source}"
270 target="${javac.target}"
271 debug="${javac.debug}"
272 encoding="${javac.encoding}"
273 includeantruntime="false" fork="true">
274 <compilerarg value="${boot.class.path}"/>
275 <compilerarg value="-Xlint:unchecked"/>
276 <compilerarg value="-Xlint:deprecation"/>
277 <compilerarg value="-Xdiags:verbose"/>
278 </javac>
279
280 <copy todir="${build.test.classes.dir}/META-INF/services">
281 <fileset dir="${test.src.dir}/META-INF/services/"/>
282 </copy>
283
284 <copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/resources">
285 <fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/resources"/>
286 </copy>
287
288 <copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/resources">
289 <fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/resources"/>
290 </copy>
291
292 <!-- tests that check nashorn internals and internal API -->
293 <jar jarfile="${nashorn.internal.tests.jar}">
294 <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/>
|