blob: 38c77934a97b0996e2eeb9ea7d15b30eba9f3c0a [file] [log] [blame]
nitind3a153a02009-04-21 23:12:24 +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.wst.xml.xpath.core.tests" />
18 <property
19 name="classname"
20 value="org.eclipse.wst.xml.xpath.core.tests.XPathCoreTests" />
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 </ant>
81
82 <copy
83 failonerror="false"
84 file="${workspace}/.metadata/.log"
85 tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
86
87 </target>
88
89 <!-- This target holds code to cleanup the testing environment after -->
90 <!-- after all of the tests have been run. You can use this target to -->
91 <!-- delete temporary files that have been created. -->
92 <target name="cleanup">
93 <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
94 <!-- <delete dir="${workspace}" quiet="true" /> -->
95 </target>
96
97 <!-- This target runs the test suite. Any actions that need to happen -->
98 <!-- after all the tests have been run should go here. -->
99 <target
100 name="run"
101 depends="init,suite,cleanup">
102 <ant
103 target="collect"
104 antfile="${library-file}"
105 dir="${eclipse-home}">
106 <property
107 name="includes"
108 value="${plugin-name}.*xml" />
109 <property
110 name="output-file"
111 value="${plugin-name}.xml" />
112 </ant>
113 </target>
114
115</project>