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