blob: cdaa27e3ed10da832e7cd410b2ae8c14550898f6 [file] [log] [blame]
david_williamsd51e2f12006-12-07 08:19:46 +00001<?xml version="1.0" encoding="UTF-8"?>
2
david_williams3926e9f2006-12-09 08:23:14 +00003<project name="testsuite" default="run" basedir=".">
4
david_williamsd51e2f12006-12-07 08:19:46 +00005 <!-- The following properties should be passed into this script -->
6 <!-- ${eclipse-home} -->
7 <!-- ${buildDirectory} -->
8 <!-- ${buildLabel} -->
9
10 <!-- should be little need to change what's above -->
david_williams3926e9f2006-12-09 08:23:14 +000011
12 <property name="plugin-name"
13 value="org.eclipse.wtp.releng.tests" />
14 <property name="classname"
15 value="org.eclipse.wtp.releng.tests.TestBuild" />
16 <property name="testType" value="core-test" />
david_williamsd51e2f12006-12-07 08:19:46 +000017
18 <!-- should be little need to change what's below -->
19
20 <echo message="basedir: ${basedir}" />
21 <echo message="eclipse-home: ${eclipse-home}" />
22 <echo message="buildDirectory: ${buildDirectory}" />
david_williams3926e9f2006-12-09 08:23:14 +000023 <echo message="buildLabel: ${buildLabel}" />
david_williamsd51e2f12006-12-07 08:19:46 +000024 <echo message="plugin-name: ${plugin-name}" />
25 <echo message="classname: ${classname}" />
26 <echo message="testType ${testType}" />
david_williams3926e9f2006-12-09 08:23:14 +000027 <echo message="buildId ${buildId}" />
david_williamsd51e2f12006-12-07 08:19:46 +000028
29
david_williams3926e9f2006-12-09 08:23:14 +000030 <property name="library-file"
31 value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
32 <property name="workspace"
33 value="${eclipse-home}/junitworkspaces/${plugin-name}" />
34
david_williamsd51e2f12006-12-07 08:19:46 +000035 <!-- This target holds all initialization code that needs to be done for -->
36 <!-- all tests that are to be run. Initialization for individual tests -->
37 <!-- should be done within the body of the suite target. -->
38 <target name="init">
39 <tstamp />
40 <delete>
david_williams3926e9f2006-12-09 08:23:14 +000041 <fileset dir="${eclipse-home}"
42 includes="${plugin-name}.*xml" />
david_williamsd51e2f12006-12-07 08:19:46 +000043 </delete>
44 <!-- make directory, in case path doesn't exist yet -->
45 <mkdir dir="${workspace}" />
46 <!-- but delete to make sure fresh contents-->
david_williams3926e9f2006-12-09 08:23:14 +000047 <delete dir="${workspace}" quiet="true" />
david_williamsd51e2f12006-12-07 08:19:46 +000048
49 </target>
50
51 <!-- This target defines the tests that need to be run. -->
52 <target name="suite">
53
david_williams3926e9f2006-12-09 08:23:14 +000054 <ant target="${testType}"
55 antfile="${library-file}"
56 dir="${eclipse-home}">
57 <property name="data-dir"
58 value="${workspace}" />
59 <property name="plugin-name"
60 value="${plugin-name}" />
61 <property name="classname"
62 value="${classname}" />
david_williams3926e9f2006-12-09 08:23:14 +000063 <property name="vmargs"
64 value="-DbuildDirectory='${buildDirectory}' -DbuildLabel='${buildLabel}'" />
david_williamsd51e2f12006-12-07 08:19:46 +000065 </ant>
66
david_williams3926e9f2006-12-09 08:23:14 +000067 <copy failonerror="false"
68 file="${workspace}/.metadata/.log"
69 tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
david_williamsd51e2f12006-12-07 08:19:46 +000070
david_williams3926e9f2006-12-09 08:23:14 +000071 <!-- copy our particular xsl to web directory for prosperity-->
72 <copy todir="${buildDirectory}/${buildLabel}/"
73 flatten="true">
74 <fileset dir="${eclipse-home}/plugins/${testPlugin}"
75 includes="versioningReportToHTML.xsl" />
76 </copy>
77 <!-- and use it to create basic display -->
78 <xslt basedir="${buildDirectory}/${buildLabel}/"
79 includes="versioningReport_*"
80 destdir="${buildDirectory}/${buildLabel}/"
81 style="versioningReportToHTML.xsl"
82 force="true" />
83
84 <echo file="${buildDirectory}/${buildLabel}/versioningReportName.php">
david_williamsbb1d93b2006-12-10 05:21:55 +000085 <![CDATA[<?php $versionReportFilename="versioningReport_${buildId}" ?>]]>
86 </echo>
david_williams3926e9f2006-12-09 08:23:14 +000087
88
89
90
91
david_williamsd51e2f12006-12-07 08:19:46 +000092 </target>
93
94 <!-- This target holds code to cleanup the testing environment after -->
95 <!-- after all of the tests have been run. You can use this target to -->
96 <!-- delete temporary files that have been created. -->
97 <target name="cleanup">
98 <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
99 <!-- <delete dir="${workspace}" quiet="true" /> -->
100 </target>
101
102 <!-- This target runs the test suite. Any actions that need to happen -->
103 <!-- after all the tests have been run should go here. -->
david_williams3926e9f2006-12-09 08:23:14 +0000104 <target name="run" depends="init,suite,cleanup">
105 <ant target="collect"
106 antfile="${library-file}"
107 dir="${eclipse-home}">
108 <property name="includes"
109 value="${plugin-name}.*xml" />
110 <property name="output-file"
111 value="${plugin-name}.xml" />
david_williamsd51e2f12006-12-07 08:19:46 +0000112 </ant>
david_williams3926e9f2006-12-09 08:23:14 +0000113
david_williamsd51e2f12006-12-07 08:19:46 +0000114 </target>
115
116</project>