1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the terms of the Common Development
and Distribution License (the License). You may not use this file except in
compliance with the License.
You can obtain a copy of the License at http://www.netbeans.org/cddl.html
or http://www.netbeans.org/cddl.txt.
When distributing Covered Code, include this CDDL Header Notice in each file
and include the License file at http://www.netbeans.org/cddl.txt.
If applicable, add the following below the CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
The Original Software is NetBeans. The Initial Developer of the Original
Code is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
Microsystems, Inc. All Rights Reserved.
-->
<project name="jemmy" default="jar" basedir=".">
<property name="package" value="org.netbeans.jemmy"/>
<property name="src.dir" value="src"/>
<property name="test.dir" value="test"/>
<property name="build.classes.dir" value="build/classes"/>
<property name="build.tests.dir" value="build/tests"/>
<property name="build.javadoc.dir" value="build/javadoc"/>
<property name="tests.results.dir" value="build/tests-results"/>
<property name="tests.report.dir" value="build/test-report"/>
<property name="dist.dir" value="build"/>
<property name="dist.jar" value="build/jemmy2.jar"/>
<property name="junit" value="../lib/junit-4.1.jar"/>
<property name="test.output" value="false"/>
<target name="java">
<echo message="Using ${java.vm.version} java"/>
</target>
<target name="timestamp" unless="buildnumber">
<tstamp>
<format property="buildnumber" pattern="yyyyMMdd"/>
</tstamp>
</target>
<target name="compile" depends="java,timestamp">
<filter token="BUILD_NUMBER" value="${buildnumber}"/>
<mkdir dir="${build.classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="on" source="1.5"/>
<copy file="${src.dir}/org/netbeans/jemmy/debug.timeouts" todir="${build.classes.dir}/org/netbeans/jemmy"/>
<copy file="${src.dir}/org/netbeans/jemmy/version_info" tofile="${build.classes.dir}/org/netbeans/jemmy/version_info" filtering="on"/>
</target>
<target name="version" depends="compile">
<filter token="BUILD_NUMBER" value="${buildnumber}"/>
<mkdir dir="${build.classes.dir}"/>
<java classpath="${build.classes.dir}" classname="org.netbeans.jemmy.JemmyProperties" args="-f"/>
</target>
<target name="clean">
<delete dir="${dist.dir}"/>
</target>
<target name="jar" depends="compile,javadoc">
<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.jar}" basedir="${build.classes.dir}" manifest="${build.classes.dir}/org/netbeans/jemmy/version_info"/>
</target>
<target name="javadoc" depends="compile">
<javadoc classpath="${junit}:${build.classes.dir}" sourcepath="${src.dir}" destdir="${build.javadoc.dir}">
<link href="/usr/share/doc/default-jdk-doc/api" />
</javadoc>
</target>
<target name="jarsrc" depends="jar">
<jar jarfile="${dist.jar}" basedir="${src.dir}" update="yes"/>
</target>
<target name="jarall" depends="jarsrc">
</target>
<target name="compile-tests" depends="compile">
<mkdir dir="${build.tests.dir}"/>
<javac srcdir="${test.dir}" destdir="${build.tests.dir}" debug="on" source="1.5" classpath="../lib/junit-4.1.jar:${build.classes.dir}"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/jemmy_012_prop1" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/jemmy_012_prop1"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/jemmy_012_prop2" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/jemmy_012_prop2"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/jemmy_013_prop1.jar" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/jemmy_013_prop1.jar"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/jemmy_013_prop2.jar" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/jemmy_013_prop2.jar"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/jemmy_014_prop1.zip" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/jemmy_014_prop1.zip"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/jemmy_014_prop2.zip" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/jemmy_014_prop2.zip"/>
<copy file="${test.dir}/org/netbeans/jemmy/testing/combo.png" tofile="${build.tests.dir}/org/netbeans/jemmy/testing/combo.png"/>
</target>
<target name="run-test" depends="compile-tests">
<mkdir dir="${tests.results.dir}"/>
<junit printsummary="yes" outputtoformatters="true" showoutput="true" fork="true"
haltonfailure="true" haltonerror="true" timeout="300000">
<classpath>
<pathelement location="${junit}"/>
<pathelement location="${build.tests.dir}"/>
<pathelement location="${build.classes.dir}"/>
</classpath>
<formatter usefile="false" type="brief"/>
<formatter type="xml"/>
<test name="${test}"/>
</junit>
</target>
<target name="test" depends="compile-tests">
<mkdir dir="${tests.results.dir}"/>
<junit printsummary="yes" outputtoformatters="${test.output}" showoutput="${test.output}" fork="true" timeout="120000"
failureproperty="tests-failed" errorproperty="tests-failed" dir="${tests.results.dir}">
<classpath>
<pathelement location="${junit}"/>
<pathelement location="${build.tests.dir}"/>
<pathelement location="${build.classes.dir}"/>
</classpath>
<formatter usefile="false" type="brief"/>
<formatter type="xml"/>
<batchtest fork="yes" todir="${tests.results.dir}">
<fileset dir="${test.dir}">
<include name="**/*jemmy_033*.java"/>
<!--include name="**/*Test.java"/-->
<exclude name="**/JemmyTest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Some tests failed." if="tests-failed" />
</target>
</project>
|