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