blob: f6888a14268e3b1301c35c21e572cea7622e17d1 [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
david_williamsf8a1a4d2009-05-31 03:48:57 +000018 <!-- if not otherwise defined, try the workbench value -->
19 <property name="eclipse-home" value="${eclipse.home}" />
20
21
david_williamsd51e2f12006-12-07 08:19:46 +000022 <!-- should be little need to change what's below -->
23
24 <echo message="basedir: ${basedir}" />
25 <echo message="eclipse-home: ${eclipse-home}" />
26 <echo message="buildDirectory: ${buildDirectory}" />
david_williams3926e9f2006-12-09 08:23:14 +000027 <echo message="buildLabel: ${buildLabel}" />
david_williamsd51e2f12006-12-07 08:19:46 +000028 <echo message="plugin-name: ${plugin-name}" />
29 <echo message="classname: ${classname}" />
30 <echo message="testType ${testType}" />
david_williams3926e9f2006-12-09 08:23:14 +000031 <echo message="buildId ${buildId}" />
david_williamsd51e2f12006-12-07 08:19:46 +000032
33
david_williams3926e9f2006-12-09 08:23:14 +000034 <property name="library-file"
35 value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
36 <property name="workspace"
37 value="${eclipse-home}/junitworkspaces/${plugin-name}" />
38
david_williamsd51e2f12006-12-07 08:19:46 +000039 <!-- This target holds all initialization code that needs to be done for -->
40 <!-- all tests that are to be run. Initialization for individual tests -->
41 <!-- should be done within the body of the suite target. -->
42 <target name="init">
43 <tstamp />
44 <delete>
david_williams3926e9f2006-12-09 08:23:14 +000045 <fileset dir="${eclipse-home}"
46 includes="${plugin-name}.*xml" />
david_williamsd51e2f12006-12-07 08:19:46 +000047 </delete>
48 <!-- make directory, in case path doesn't exist yet -->
49 <mkdir dir="${workspace}" />
50 <!-- but delete to make sure fresh contents-->
david_williams3926e9f2006-12-09 08:23:14 +000051 <delete dir="${workspace}" quiet="true" />
david_williamsd51e2f12006-12-07 08:19:46 +000052
53 </target>
54
55 <!-- This target defines the tests that need to be run. -->
56 <target name="suite">
57
david_williams3926e9f2006-12-09 08:23:14 +000058 <ant target="${testType}"
59 antfile="${library-file}"
60 dir="${eclipse-home}">
61 <property name="data-dir"
62 value="${workspace}" />
63 <property name="plugin-name"
64 value="${plugin-name}" />
65 <property name="classname"
66 value="${classname}" />
david_williams3926e9f2006-12-09 08:23:14 +000067 <property name="vmargs"
68 value="-DbuildDirectory='${buildDirectory}' -DbuildLabel='${buildLabel}'" />
david_williamsd51e2f12006-12-07 08:19:46 +000069 </ant>
70
david_williams3926e9f2006-12-09 08:23:14 +000071 <copy failonerror="false"
72 file="${workspace}/.metadata/.log"
73 tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
david_williamsd51e2f12006-12-07 08:19:46 +000074
david_williams55e16972008-08-08 04:25:53 +000075 <!-- copy our particular xsl files to web directory for prosperity-->
david_williams3926e9f2006-12-09 08:23:14 +000076 <copy todir="${buildDirectory}/${buildLabel}/"
77 flatten="true">
78 <fileset dir="${eclipse-home}/plugins/${testPlugin}"
david_williams55e16972008-08-08 04:25:53 +000079 includes="*.xsl" />
david_williams3926e9f2006-12-09 08:23:14 +000080 </copy>
david_williams55e16972008-08-08 04:25:53 +000081 <!-- and use them to create basic display -->
david_williams3926e9f2006-12-09 08:23:14 +000082 <xslt basedir="${buildDirectory}/${buildLabel}/"
83 includes="versioningReport_*"
84 destdir="${buildDirectory}/${buildLabel}/"
85 style="versioningReportToHTML.xsl"
86 force="true" />
87
88 <echo file="${buildDirectory}/${buildLabel}/versioningReportName.php">
david_williamsd051b362009-01-20 01:31:43 +000089 <![CDATA[<?php $versionReportFilename="versioningReport_${buildLabel}" ?>]]>
david_williamsbb1d93b2006-12-10 05:21:55 +000090 </echo>
david_williams3926e9f2006-12-09 08:23:14 +000091
92
93
94
95
david_williamsd51e2f12006-12-07 08:19:46 +000096 </target>
97
98 <!-- This target holds code to cleanup the testing environment after -->
99 <!-- after all of the tests have been run. You can use this target to -->
100 <!-- delete temporary files that have been created. -->
101 <target name="cleanup">
102 <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
103 <!-- <delete dir="${workspace}" quiet="true" /> -->
104 </target>
105
106 <!-- This target runs the test suite. Any actions that need to happen -->
107 <!-- after all the tests have been run should go here. -->
david_williams3926e9f2006-12-09 08:23:14 +0000108 <target name="run" depends="init,suite,cleanup">
109 <ant target="collect"
110 antfile="${library-file}"
111 dir="${eclipse-home}">
112 <property name="includes"
113 value="${plugin-name}.*xml" />
114 <property name="output-file"
115 value="${plugin-name}.xml" />
david_williamsd51e2f12006-12-07 08:19:46 +0000116 </ant>
david_williams3926e9f2006-12-09 08:23:14 +0000117
david_williamsd51e2f12006-12-07 08:19:46 +0000118 </target>
119
120</project>