ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame^] | 1 | <project name="Build specific targets and properties" default="test"> |
| 2 | <property name="postingDirectory" value="${buildDirectory}" /> |
| 3 | |
| 4 | |
| 5 | |
| 6 | <!-- ===================================================================== --> |
| 7 | <!-- Steps to do after the build is done. --> |
| 8 | <!-- ===================================================================== --> |
| 9 | <target name="test"> |
| 10 | <antcall target="runTest" /> |
| 11 | <antcall target="gatherLogs" /> |
| 12 | </target> |
| 13 | |
| 14 | <!-- ===================================================================== --> |
| 15 | <!-- Steps to do to test the build results --> |
| 16 | <!-- ===================================================================== --> |
| 17 | <target name="runTest"> |
| 18 | |
| 19 | <dirname file="${ant.file}" property="test.component.dir" /> |
| 20 | <ant antfile="${test.component.dir}/../../scripts/build/label.xml" /> |
| 21 | <property file="${buildDirectory}/label.properties" /> |
| 22 | |
| 23 | <mkdir dir="${testRoot}" /> |
| 24 | <mkdir dir="${testRoot}/results" /> |
| 25 | <mkdir dir="${testRoot}/results/consolelogs" /> |
| 26 | |
| 27 | <copy todir="${testRoot}" overwrite="true"> |
| 28 | <fileset dir="${test.component.dir}/testScripts"> |
| 29 | </fileset> |
| 30 | </copy> |
| 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.wtp/maps/dependencies.properties" /> |
| 35 | <property name="base.install.dir" value="${testRoot}" /> |
| 36 | </ant> |
| 37 | <unzip dest="${testRoot}" src="${postingDirectory}/${buildLabel}/wtp-${buildId}.zip" overwrite="true" /> |
| 38 | <unzip dest="${testRoot}" src="${postingDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" overwrite="true" /> |
| 39 | <unzip dest="${testRoot}" src="${postingDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" overwrite="true" /> |
| 40 | |
| 41 | <antcall target="runTestEclipse"> |
| 42 | <param name="testTarget" value="all" /> |
| 43 | </antcall> |
| 44 | <antcall target="postRunTestEclipse"> |
| 45 | <param name="testTarget" value="all" /> |
| 46 | </antcall> |
| 47 | </target> |
| 48 | |
| 49 | <target name="runTestEclipse"> |
| 50 | <java classpath="${testRoot}/eclipse/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true" timeout="3600000" output="${testRoot}/results/consolelogs/wtptestlog.txt" dir="${testRoot}"> |
| 51 | <jvmarg value="-Dosgi.ws=${basews}" /> |
| 52 | <jvmarg value="-Dosgi.os=${baseos}" /> |
| 53 | <jvmarg value="-Dosgi.arch=${basearch}" /> |
| 54 | <jvmarg value="-Dws=${basews}" /> |
| 55 | <jvmarg value="-Dos=${baseos}" /> |
| 56 | <jvmarg value="-Darch=${basearch}" /> |
| 57 | <jvmarg value="-Dnoclean=true" /> |
| 58 | <arg value="-propertyfile" /> |
| 59 | <arg value="test.properties" /> |
| 60 | <arg value="-application" /> |
| 61 | <arg value="org.eclipse.ant.core.antRunner" /> |
| 62 | <arg value="-file" /> |
| 63 | <arg value="test.xml" /> |
| 64 | <arg value="-logger" /> |
| 65 | <arg value="org.apache.tools.ant.DefaultLogger" /> |
| 66 | <arg value="${testTarget}" /> |
| 67 | <sysproperty key="build.home" value="${build.home}" /> |
| 68 | <sysproperty key="buildDirectory" value="${buildDirectory}" /> |
| 69 | <sysproperty key="baseLocation" value="${baseLocation}" /> |
| 70 | <sysproperty key="testDir" value="${testRoot}" /> |
| 71 | <sysproperty key="perf.buildId" value="${buildType}${date}-${time}" /> |
| 72 | <sysproperty key="eclipseBuilderDirectory" value="${build.home}/${eclipse.builder}" /> |
| 73 | </java> |
| 74 | </target> |
| 75 | |
| 76 | <target name="postRunTestEclipse"> |
| 77 | <copy todir="${buildDirectory}/${buildLabel}/testResults" overwrite="true"> |
| 78 | <fileset dir="${testRoot}/results"> |
| 79 | <include name="**/*.*" /> |
| 80 | </fileset> |
| 81 | </copy> |
| 82 | </target> |
| 83 | |
| 84 | <!-- ===================================================================== --> |
| 85 | <!-- Steps to do to publish the build results --> |
| 86 | <!-- ===================================================================== --> |
| 87 | <target name="publish"> |
| 88 | </target> |
| 89 | |
| 90 | <!-- ===================================================================== --> |
| 91 | <!-- Default target --> |
| 92 | <!-- ===================================================================== --> |
| 93 | <target name="noDefault"> |
| 94 | <echo message="You must specify a target when invoking this file" /> |
| 95 | </target> |
| 96 | |
| 97 | </project> |