david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 1 | <project name="Build specific targets and properties" default="test"> |
| 2 | |
| 3 | |
| 4 | |
| 5 | <!-- ===================================================================== --> |
| 6 | <!-- Steps to do after the build is done. --> |
| 7 | <!-- ===================================================================== --> |
| 8 | <target name="test"> |
| 9 | <antcall target="runTest" /> |
| 10 | </target> |
| 11 | |
| 12 | <!-- ===================================================================== --> |
| 13 | <!-- Steps to do to test the build results --> |
| 14 | <!-- ===================================================================== --> |
| 15 | <target name="runTest"> |
| 16 | |
| 17 | <dirname file="${ant.file}" property="test.component.dir" /> |
| 18 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> |
| 19 | <property file="${buildDirectory}/label.properties" /> |
| 20 | <property file="${wtp.builder.home}/build.properties" /> |
| 21 | |
| 22 | <mkdir dir="${testRoot}" /> |
| 23 | <mkdir dir="${testRoot}/results" /> |
| 24 | <mkdir dir="${testRoot}/results/consolelogs" /> |
| 25 | |
| 26 | <copy todir="${testRoot}" overwrite="true"> |
| 27 | <fileset dir="${test.component.dir}/testScripts"> |
| 28 | </fileset> |
| 29 | </copy> |
| 30 | |
| 31 | |
| 32 | <echo message="${baseos} ${basews} ${basearch} " /> |
| 33 | <ant antfile="${test.component.dir}/testdependency.xml" target="get"> |
| 34 | <property name="dependency.properties" value="${buildDirectory}/maps/releng/maps/dependencies.properties" /> |
| 35 | <property name="base.install.dir" value="${testRoot}" /> |
| 36 | </ant> |
| 37 | |
| 38 | <sleep seconds="5"/> |
| 39 | <unzip dest="${testRoot}" src="${buildDirectory}/${buildLabel}/wtp-${buildLabel}.zip" overwrite="true" /> |
| 40 | |
| 41 | |
| 42 | <antcall target="runTestEclipse"> |
| 43 | <param name="testTarget" value="all" /> |
| 44 | </antcall> |
| 45 | <antcall target="postRunTestEclipse"> |
| 46 | <param name="testTarget" value="all" /> |
| 47 | </antcall> |
| 48 | |
| 49 | </target> |
| 50 | |
| 51 | |
| 52 | |
| 53 | <target name="runTestEclipse"> |
david_williams | 54315a7 | 2007-02-14 22:50:44 +0000 | [diff] [blame] | 54 | <java taskname="test-wtp-${testTarget}" jar="${testRoot}/eclipse/startup.jar" fork="true" failonerror="true" timeout="7200000" output="${testRoot}/results/consolelogs/wtptestlog.txt" dir="${testRoot}"> |
david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 55 | <jvmarg value="-Dosgi.ws=${basews}" /> |
| 56 | <jvmarg value="-Dosgi.os=${baseos}" /> |
| 57 | <jvmarg value="-Dosgi.arch=${basearch}" /> |
| 58 | <jvmarg value="-Dws=${basews}" /> |
| 59 | <jvmarg value="-Dos=${baseos}" /> |
| 60 | <jvmarg value="-Darch=${basearch}" /> |
| 61 | <jvmarg value="-Dnoclean=true" /> |
| 62 | <jvmarg value="-DbuildBranch=${buildBranch}" /> |
| 63 | <jvmarg value="-DbuildType=${buildType}" /> |
| 64 | <jvmarg value="-DbuildId=${buildId}" /> |
| 65 | <jvmarg value="-DbuildLabel=${buildLabel}" /> |
david_williams | 0c366d3 | 2006-12-10 07:08:39 +0000 | [diff] [blame] | 66 | <arg value="-application" /> |
| 67 | <arg value="org.eclipse.ant.core.antRunner" /> |
| 68 | <arg value="-file" /> |
| 69 | <arg value="test.xml" /> |
| 70 | <arg value="-logger" /> |
| 71 | <arg value="org.apache.tools.ant.DefaultLogger" /> |
| 72 | <arg value="${testTarget}" /> |
| 73 | <sysproperty key="build.home" value="${build.home}" /> |
| 74 | <sysproperty key="buildDirectory" value="${buildDirectory}" /> |
| 75 | <sysproperty key="baseLocation" value="${baseLocation}" /> |
| 76 | <sysproperty key="testDir" value="${testRoot}" /> |
| 77 | <sysproperty key="perf.buildId" value="${buildType}${date}-${time}" /> |
| 78 | <sysproperty key="eclipseBuilderDirectory" value="${pde.builder.path}" /> |
| 79 | </java> |
| 80 | </target> |
| 81 | |
| 82 | <target name="postRunTestEclipse"> |
| 83 | <copy todir="${buildDirectory}/${buildLabel}/testResults" overwrite="true"> |
| 84 | <fileset dir="${testRoot}/results"> |
| 85 | <include name="**/*.*" /> |
| 86 | </fileset> |
| 87 | </copy> |
| 88 | </target> |
| 89 | |
| 90 | |
| 91 | </project> |