blob: 71671d5fb2cd6dda62e35d98cd067cc6a32a173c [file] [log] [blame]
david_williamsd51e2f12006-12-07 08:19:46 +00001<?xml version="1.0" encoding="UTF-8"?>
2
3<project
4 name="testsuite"
5 default="run"
6 basedir=".">
7
8 <!-- The following properties should be passed into this script -->
9 <!-- ${eclipse-home} -->
10 <!-- ${buildDirectory} -->
11 <!-- ${buildLabel} -->
12
13 <!-- should be little need to change what's above -->
14
15 <property
16 name="plugin-name"
17 value="org.eclipse.wtp.releng.tests" />
18 <property
19 name="classname"
20 value="org.eclipse.wtp.releng.tests.TestBuild" />
21 <property
22 name="testType"
23 value="core-test" />
24
25 <!-- should be little need to change what's below -->
26
27 <echo message="basedir: ${basedir}" />
28 <echo message="eclipse-home: ${eclipse-home}" />
29 <echo message="buildDirectory: ${buildDirectory}" />
30 <echo message="plugin-name: ${plugin-name}" />
31 <echo message="classname: ${classname}" />
32 <echo message="testType ${testType}" />
33
34
35 <property
36 name="library-file"
37 value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
38 <property
39 name="workspace"
40 value="${eclipse-home}/junitworkspaces/${plugin-name}" />
41
42 <!-- This target holds all initialization code that needs to be done for -->
43 <!-- all tests that are to be run. Initialization for individual tests -->
44 <!-- should be done within the body of the suite target. -->
45 <target name="init">
46 <tstamp />
47 <delete>
48 <fileset
49 dir="${eclipse-home}"
50 includes="${plugin-name}.*xml" />
51 </delete>
52 <!-- make directory, in case path doesn't exist yet -->
53 <mkdir dir="${workspace}" />
54 <!-- but delete to make sure fresh contents-->
55 <delete
56 dir="${workspace}"
57 quiet="true" />
58
59 </target>
60
61 <!-- This target defines the tests that need to be run. -->
62 <target name="suite">
63
64 <ant
65 target="${testType}"
66 antfile="${library-file}"
67 dir="${eclipse-home}">
68 <property
69 name="data-dir"
70 value="${workspace}" />
71 <property
72 name="plugin-name"
73 value="${plugin-name}" />
74 <property
75 name="classname"
76 value="${classname}" />
77 <property
78 name="plugin-path"
79 value="${eclipse-home}/plugins/${plugin-name}" />
80 <property
81 name="buildDirectory"
82 value="${buildDirectory}" />
83 <property
84 name="buildLabel"
85 value="${buildLabel}" />
86 </ant>
87
88 <copy
89 failonerror="false"
90 file="${workspace}/.metadata/.log"
91 tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
92
93 </target>
94
95 <!-- This target holds code to cleanup the testing environment after -->
96 <!-- after all of the tests have been run. You can use this target to -->
97 <!-- delete temporary files that have been created. -->
98 <target name="cleanup">
99 <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
100 <!-- <delete dir="${workspace}" quiet="true" /> -->
101 </target>
102
103 <!-- This target runs the test suite. Any actions that need to happen -->
104 <!-- after all the tests have been run should go here. -->
105 <target
106 name="run"
107 depends="init,suite,cleanup">
108 <ant
109 target="collect"
110 antfile="${library-file}"
111 dir="${eclipse-home}">
112 <property
113 name="includes"
114 value="${plugin-name}.*xml" />
115 <property
116 name="output-file"
117 value="${plugin-name}.xml" />
118 </ant>
119 </target>
120
121</project>