Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 211751 | Differences between
and this patch

Collapse All | Expand All

(-)org/eclipse/tptp/platform/releng/tools/testautomation/build.xml (-146 / +248 lines)
Lines 1-6 Link Here
1
<!--
1
<!--
2
2
3
  Copyright (c) 2008 IBM Corporation and others. 
3
  Copyright (c) 2008, 2010 IBM Corporation and others. 
4
  All rights reserved.   This program and the accompanying materials 
4
  All rights reserved.   This program and the accompanying materials 
5
  are made available under the terms of the Eclipse Public License v1.0 
5
  are made available under the terms of the Eclipse Public License v1.0 
6
  which accompanies this distribution, and is available at 
6
  which accompanies this distribution, and is available at 
Lines 24-52 Link Here
24
	<!-- Setup the location to store the BIRT Reports -->
24
	<!-- Setup the location to store the BIRT Reports -->
25
	<property name="report.publication.location" location="${reportLocation}"/>
25
	<property name="report.publication.location" location="${reportLocation}"/>
26
26
27
	<target name="runTests" depends="runTestSuites, checkResults, publishBVTReport" />
27
	<!-- Set the project property -->
28
	<property name="tptp.test.project" value="${testProject}" />
29
	
30
    <!-- import the tests into the workspace, configure the remote machine, run the tests, and update the test report -->
31
	<!-- import removed for artifact setup, call it first -->
32
	<target name="runTests" depends="configureRemoteMachine, runTestSuites, checkResults, publishBVTReport, checkInBVT" />
28
33
29
	<!-- Execute multiple test suites -->
34
	<!-- Execute multiple test suites -->
30
	<target name="runTestSuites">
35
	<target name="runTestSuites">
31
	    <property name="tptp.test.project" value="${testProject}" />
36
		<antcall target="time"/>
37
		<!-- BVT cannot run AGR, see bug 305325 -->
32
		<!-- Setup the location of the test suites -->
38
		<!-- Setup the location of the test suites -->
33
		<property name="project.dir" value="${tptp.test.workspace}/${tptp.test.project}" />
39
		<property name="project.dir" value="${tptp.test.workspace}/${tptp.test.project}" />
34
		<!-- <property name="tptp.test.connection" value="tptp:rac://${hostname}:10002" /> -->
35
		<property name="tptp.test.deployment" value="deployment/BVTDeployment.deploy" />
40
		<property name="tptp.test.deployment" value="deployment/BVTDeployment.deploy" />
36
		
41
37
		<tptp:execution resultsrefid="tptp.test.results">
42
		<tptp:execution resultsrefid="test_results_reference_ID" overwrite="true" results="BVT_results/">
38
			<fileset dir="${project.dir}">
43
			<filelist dir="${project.dir}" >
39
				<include name="**/*${testSuite}*.testsuite" />
44
				<file name="BVT/AllBVTJUnitTests_${targetJRE}.testsuite"/>
40
				<exclude name="**/*${excludeTestSuite}*.testsuite" />
45
			    <file name="BVT/AllBVTJUnitPluginTests_${targetJRE}.testsuite"/>
41
			</fileset>
46
				<!-- <file name="BVT/AllBVTGUITests_${targetJRE}.testsuite"/> -->
47
			</filelist>
42
		</tptp:execution>
48
		</tptp:execution>
43
	</target>
49
	</target>
44
50
45
	<target name="checkResults" >
51
	<target name="checkResults">
52
		<antcall target="time"/>
46
		<echo message="Checking results"/>
53
		<echo message="Checking results"/>
47
		<condition property="tptp.test.success">
54
		<condition property="tptp.test.success">
48
			<tptp:interrogation verdictproperty="tptp.test.verdict">
55
			<tptp:interrogation verdictproperty="tptp.test.verdict">
49
				<filelist refid="tptp.test.results"/>
56
				<filelist refid="test_results_reference_ID"/>
50
			</tptp:interrogation>
57
			</tptp:interrogation>
51
		</condition>
58
		</condition>
52
		<echo message="The test results are: '${tptp.test.verdict}'"/>
59
		<echo message="The test results are: '${tptp.test.verdict}'"/>
Lines 66-81 Link Here
66
73
67
	<!-- Publish report -->
74
	<!-- Publish report -->
68
	<target name="publishBVTReport">
75
	<target name="publishBVTReport">
76
		<antcall target="time"/>
69
	    <property name="tptp.publication.service" value="org.eclipse.tptp.test.report.birt.publish-tabular" />
77
	    <property name="tptp.publication.service" value="org.eclipse.tptp.test.report.birt.publish-tabular" />
70
	    <property name="tptp.test.project" value="${testProject}" />
78
	    <tptp:publication report="${report.publication.location}/${targetJRE}">
71
		<tptp:publication report="${report.publication.location}">
79
			<filelist refid="test_results_reference_ID"/>
72
			<filelist refid="tptp.test.results"/>
73
		</tptp:publication>
80
		</tptp:publication>
74
	</target>
81
	</target>
75
82
76
	<target name="publishReport" depends="setPublishEndTime">
83
	<target name="publishReport" depends="setPublishEndTime">
77
	    <property name="tptp.publication.service" value="org.eclipse.tptp.test.report.birt.publish-tabular-testsuites" />
84
	    <property name="tptp.publication.service" value="org.eclipse.tptp.test.report.birt.publish-tabular-testsuites" />
78
        <property name="tptp.test.project" value="${testProject}" />
79
		<echo message="Publishing reports ${startTime} ${endTime}" />
85
		<echo message="Publishing reports ${startTime} ${endTime}" />
80
		<tptp:publication report="${report.publication.location}"
86
		<tptp:publication report="${report.publication.location}"
81
		    startDateTime="${startTime}" endDateTime="${endTime}">
87
		    startDateTime="${startTime}" endDateTime="${endTime}">
Lines 86-189 Link Here
86
		</tptp:publication>
92
		</tptp:publication>
87
	</target>
93
	</target>
88
94
89
    <target name="setupBVT" depends="getDrivers, setupLocalMachine, setupRemoteMachine, cleanupDownloads, configureRemoteMachine, extractTests, import" />
95
    <!-- Download the drivers, create a local workbench and workspace, and extract the tests from CVS -->
96
    <target name="setupBVT" depends="getDrivers, setupLocalMachine, extractTests" />
90
    <target name="setupReport" depends="cleanupWorkspace, extractTests, import" />
97
    <target name="setupReport" depends="cleanupWorkspace, extractTests, import" />
91
98
92
	<target name="getDrivers">
99
	<target name="getDrivers" depends="cleanupDownloads">
100
		<antcall target="time"/>
93
101
102
		<!-- Create the working directories -->
94
	    <mkdir dir="${tempDir}" />
103
	    <mkdir dir="${tempDir}" />
95
96
		<!-- Download the tptp all in one and update it with the additional dependencies -->
97
		<get dest="${tempDir}/${tptpWinDriver}" src="${tptpWinUrl}" />
98
		<get dest="${tempDir}/${tptpLinuxDriver}" src="${tptpLinuxUrl}" />
99
		<get dest="${tempDir}/${apiRecFrameworkDriver}" src="${apiRecFrameworkUrl}" />
100
		<get dest="${tempDir}/${agrDriver}" src="${agrUrl}" />
101
		<get dest="${tempDir}/${ltaDriver}" src="${ltaUrl}" />
102
		<get dest="${tempDir}/${testReportBirtDriver}" src="${testReportBirtUrl}" />
103
		<get dest="${tempDir}/${monitorReportBirtDriver}" src="${monitorReportBirtUrl}" />
104
		<get dest="${tempDir}/${traceReportBirtDriver}" src="${traceReportBirtUrl}" />
105
		<get dest="${tempDir}/${platformReportBirtDriver}" src="${platformReportBirtUrl}" />
106
		<get dest="${tempDir}/${perfmonDriver}" src="${perfmonUrl}" />
107
		<get dest="${tempDir}/${codereviewCppDriver}" src="${codereviewCppUrl}" />
108
		<get dest="${tempDir}/${birtDriver}" src="${birtUrl}"/>
109
		<get dest="${tempDir}/${cdtDriver}" src="${cdtUrl}"/>
110
		<get dest="${tempDir}/${dtpDriver}" src="${dtpUrl}"/>
111
		<get dest="${tempDir}/${gefDriver}" src="${gefUrl}"/>
112
		<get dest="${tempDir}/${wtpDriver}" src="${wtpUrl}"/>
113
114
		<mkdir dir="${tempDir}/dependencies" />
104
		<mkdir dir="${tempDir}/dependencies" />
115
		<antcall target="unzip">
105
		<mkdir dir="${tempDir}/linuxAllInOne"/>
116
		    <param name="destDir" value="${tempDir}/dependencies" />
106
		<mkdir dir="${tempDir}/winAllInOne"/>
117
		    <param name="srcDir" value="${tempDir}/${apiRecFrameworkDriver}" />
107
	
118
		</antcall>
108
		<!-- Download TPTP first so As-Is overwrites empty plug-ins -->
119
		<antcall target="unzip">
109
		<antcall target="fetch.unzip">
120
		    <param name="destDir" value="${tempDir}/dependencies" />
110
			<param name="url" value="${tptpAllUrl}" />
121
		    <param name="srcDir" value="${tempDir}/${agrDriver}" />
111
			<param name="driver" value="${tptpAllDriver}" />
112
			<param name="srcDir" value="${tempDir}" />
113
			<param name="destDir" value="${tempDir}/dependencies" />
122
		</antcall>
114
		</antcall>
123
		<antcall target="unzip">
115
		
124
		    <param name="destDir" value="${tempDir}/dependencies" />
116
		<!-- Download the tptp all in one and update it with the additional dependencies -->
125
		    <param name="srcDir" value="${tempDir}/${ltaDriver}" />
117
		<antcall target="fetch.unzip">
126
		</antcall>
118
			<param name="url" value="${agrUrl}" />
127
		<antcall target="unzip">
119
			<param name="driver" value="${agrDriver}" />
128
		    <param name="destDir" value="${tempDir}/dependencies" />
120
			<param name="srcDir" value="${tempDir}" />
129
		    <param name="srcDir" value="${tempDir}/${testReportBirtDriver}" />
121
			<param name="destDir" value="${tempDir}/dependencies" />
130
		</antcall>
131
		<antcall target="unzip">
132
		    <param name="destDir" value="${tempDir}/dependencies" />
133
		    <param name="srcDir" value="${tempDir}/${monitorReportBirtDriver}" />
134
		</antcall>
122
		</antcall>
135
		<antcall target="unzip">
123
		
136
		    <param name="destDir" value="${tempDir}/dependencies" />
124
		<antcall target="fetch.unzip">
137
		    <param name="srcDir" value="${tempDir}/${traceReportBirtDriver}" />
125
			<param name="url" value="${testReportBirtUrl}" />
126
			<param name="driver" value="${testReportBirtDriver}" />
127
			<param name="srcDir" value="${tempDir}" />
128
			<param name="destDir" value="${tempDir}/dependencies" />
138
		</antcall>
129
		</antcall>
139
		<antcall target="unzip">
130
		
140
		    <param name="destDir" value="${tempDir}/dependencies" />
131
		<antcall target="fetch.unzip">
141
		    <param name="srcDir" value="${tempDir}/${platformReportBirtDriver}" />
132
			<param name="url" value="${traceReportBirtUrl}" />
133
			<param name="driver" value="${traceReportBirtDriver}" />
134
			<param name="srcDir" value="${tempDir}" />
135
			<param name="destDir" value="${tempDir}/dependencies" />
142
		</antcall>
136
		</antcall>
143
		<antcall target="unzip">
137
144
		    <param name="destDir" value="${tempDir}/dependencies" />
138
		<antcall target="fetch.unzip">
145
		    <param name="srcDir" value="${tempDir}/${perfmonDriver}" />
139
			<param name="url" value="${birtUrl}" />
140
			<param name="driver" value="${birtDriver}" />
141
			<param name="srcDir" value="${tempDir}" />
142
			<param name="destDir" value="${tempDir}/dependencies" />
146
		</antcall>
143
		</antcall>
147
		<antcall target="unzip">
144
		
148
		    <param name="destDir" value="${tempDir}/dependencies" />
145
		<antcall target="fetch.unzip">
149
		    <param name="srcDir" value="${tempDir}/${codereviewCppDriver}" />
146
			<param name="url" value="${dtpUrl}" />
147
			<param name="driver" value="${dtpDriver}" />
148
			<param name="srcDir" value="${tempDir}" />
149
			<param name="destDir" value="${tempDir}/dependencies" />
150
		</antcall>
150
		</antcall>
151
		<antcall target="unzip">
151
		
152
		    <param name="destDir" value="${tempDir}/dependencies" />
152
		<!-- The eclipse project drivers are combined manually since the URL is generic to the project -->
153
		    <param name="srcDir" value="${tempDir}/${birtDriver}" />
153
		<antcall target="fetch.untar">
154
			<param name="url" value="${eclipseSDKUrl}/${eclipseLinuxSDKDriver}" />
155
			<param name="driver" value="${eclipseLinuxSDKDriver}" />
156
			<param name="srcDir" value="${tempDir}" />
157
			<param name="destDir" value="${tempDir}/linuxAllInOne" />
154
		</antcall>
158
		</antcall>
155
		<antcall target="unzip">
159
		
156
		    <param name="destDir" value="${tempDir}/dependencies/eclipse" />
160
		<antcall target="fetch.unzip">
157
		    <param name="srcDir" value="${tempDir}/${cdtDriver}" />
161
			<param name="url" value="${eclipseSDKUrl}/${eclipseWinSDKDriver}" />
162
			<param name="driver" value="${eclipseWinSDKDriver}" />
163
			<param name="srcDir" value="${tempDir}" />
164
			<param name="destDir" value="${tempDir}/winAllInOne" />
165
		</antcall>
166
			
167
		<antcall target="fetch.unzip">
168
			<param name="url" value="${emfUrl}" />
169
			<param name="driver" value="${emfDriver}" />
170
			<param name="srcDir" value="${tempDir}" />
171
			<param name="destDir" value="${tempDir}/dependencies" />
158
		</antcall>
172
		</antcall>
159
		<antcall target="unzip">
173
		
160
		    <param name="destDir" value="${tempDir}/dependencies" />
174
		<antcall target="fetch.unzip">
161
		    <param name="srcDir" value="${tempDir}/${dtpDriver}" />
175
			<param name="url" value="${xsdUrl}" />
176
			<param name="driver" value="${xsdDriver}" />
177
			<param name="srcDir" value="${tempDir}" />
178
			<param name="destDir" value="${tempDir}/dependencies" />
162
		</antcall>
179
		</antcall>
163
		<antcall target="unzip">
180
		
164
		    <param name="destDir" value="${tempDir}/dependencies" />
181
		<antcall target="fetch.unzip">
165
		    <param name="srcDir" value="${tempDir}/${gefDriver}" />
182
			<param name="url" value="${gefUrl}" />
183
			<param name="driver" value="${gefDriver}" />
184
			<param name="srcDir" value="${tempDir}" />
185
			<param name="destDir" value="${tempDir}/dependencies" />
166
		</antcall>
186
		</antcall>
167
		<antcall target="unzip">
187
		
168
		    <param name="destDir" value="${tempDir}/dependencies" />
188
		<antcall target="fetch.unzip">
169
		    <param name="srcDir" value="${tempDir}/${wtpDriver}" />
189
			<param name="url" value="${wtpUrl}" />
190
			<param name="driver" value="${wtpDriver}" />
191
			<param name="srcDir" value="${tempDir}" />
192
			<param name="destDir" value="${tempDir}/dependencies" />
170
		</antcall>
193
		</antcall>
171
194
		
195
		
172
		<echo message="Updating Windows All-In-One" />
196
		<echo message="Updating Windows All-In-One" />
173
		<mkdir dir="${tempDir}/winAllInOne" />
174
		<antcall target="unzip">
175
		    <param name="destDir" value="${tempDir}/winAllInOne" />
176
		    <param name="srcDir" value="${tempDir}/${tptpWinDriver}" />
177
		</antcall>
178
197
198
		<!-- Copy the plug-ins into the All In One -->
179
		<antcall target="copy">
199
		<antcall target="copy">
180
		    <param name="baseDir" value="${tempDir}" />
200
		    <param name="baseDir" value="${tempDir}" />
181
		    <param name="destDir" value="winAllInOne" />
201
		    <param name="destDir" value="winAllInOne/eclipse/dropins" />
182
		    <param name="srcDir" value="dependencies/eclipse" />
202
		    <param name="srcDir" value="dependencies/eclipse" />
183
		</antcall>
203
		</antcall>
184
204
185
		<delete file="${tempDir}/${tptpWinDriver}" />
186
187
		<antcall target="zip">
205
		<antcall target="zip">
188
		    <param name="destDir" value="${tempDir}" />
206
		    <param name="destDir" value="${tempDir}" />
189
		    <param name="zipName" value="${tptpWinDriver}" />
207
		    <param name="zipName" value="${tptpWinDriver}" />
Lines 192-211 Link Here
192
		</antcall>
210
		</antcall>
193
211
194
		<echo message="Updating Linux All-In-One" />
212
		<echo message="Updating Linux All-In-One" />
195
		<mkdir dir="${tempDir}/linuxAllInOne" />
213
		
196
		<antcall target="unzip">
214
		<!-- Copy the plug-ins into the All In One -->
197
		    <param name="destDir" value="${tempDir}/linuxAllInOne" />
198
		    <param name="srcDir" value="${tempDir}/${tptpLinuxDriver}" />
199
		</antcall>
200
201
		<antcall target="copy">
215
		<antcall target="copy">
202
		    <param name="baseDir" value="${tempDir}" />
216
		    <param name="baseDir" value="${tempDir}" />
203
		    <param name="destDir" value="linuxAllInOne" />
217
		    <param name="destDir" value="linuxAllInOne/eclipse/dropins" />
204
		    <param name="srcDir" value="dependencies/eclipse" />
218
		    <param name="srcDir" value="dependencies/eclipse" />
205
		</antcall>
219
		</antcall>
206
220
207
		<delete file="${tempDir}/${tptpLinuxDriver}" />
208
209
		<antcall target="zip">
221
		<antcall target="zip">
210
		    <param name="destDir" value="${tempDir}" />
222
		    <param name="destDir" value="${tempDir}" />
211
		    <param name="zipName" value="${tptpLinuxDriver}" />
223
		    <param name="zipName" value="${tptpLinuxDriver}" />
Lines 213-222 Link Here
213
		    <param name="srcFolder" value="eclipse" />
225
		    <param name="srcFolder" value="eclipse" />
214
		</antcall>
226
		</antcall>
215
227
216
		<get dest="${tempDir}/${acwinDriver}" src="${acwinUrl}" />
228
		<get dest="${tempDir}/${acLinuxDriver}" src="${acLinuxUrl}" />
229
		<get dest="${tempDir}/${acWinDriver}" src="${acWinUrl}" />
217
230
218
	</target>
231
	</target>
219
232
233
	<target name="fetch.unzip">
234
		<get dest="${srcDir}/${driver}" src="${url}" />
235
		<antcall target="unzip">
236
			<param name="srcDir" value="${srcDir}/${driver}" />
237
			<param name="destDir" value="${destDir}" />
238
		</antcall>
239
	</target>
240
		
241
	<target name="fetch.untar">
242
		<get dest="${srcDir}/${driver}" src="${url}" />
243
		<antcall target="untar">
244
			<param name="srcDir" value="${srcDir}/${driver}" />
245
			<param name="destDir" value="${destDir}" />
246
		</antcall>
247
	</target>
248
	
249
	<target name="untar">
250
	    <exec executable="tar" dir="${destDir}">
251
		    <arg line="-oxzf ${srcDir}" />
252
		</exec>
253
	</target>
254
		
220
	<target name="unzip">
255
	<target name="unzip">
221
	    <exec executable="unzip" dir="${destDir}">
256
	    <exec executable="unzip" dir="${destDir}">
222
		    <arg line="-oq ${srcDir}" />
257
		    <arg line="-oq ${srcDir}" />
Lines 236-241 Link Here
236
	</target>
271
	</target>
237
272
238
	<target name="setupLocalMachine">
273
	<target name="setupLocalMachine">
274
	    <antcall target="time"/>
239
	    <echo message="Cleaning up Local Machine before setup" />
275
	    <echo message="Cleaning up Local Machine before setup" />
240
	    <antcall target="cleanupLocal" />
276
	    <antcall target="cleanupLocal" />
241
	    <antcall target="copy">
277
	    <antcall target="copy">
Lines 250-255 Link Here
250
	            <include name="org.eclipse.hyades.execution_*/ant-tptp.jar" />
286
	            <include name="org.eclipse.hyades.execution_*/ant-tptp.jar" />
251
	        </fileset>
287
	        </fileset>
252
	    </copy>
288
	    </copy>
289
		<copy todir="${ant.home}/lib" overwrite="true" flatten="true">
290
	        <fileset dir="${eclipse.home}/eclipse/dropins/eclipse/plugins">
291
	            <include name="org.eclipse.hyades.execution_*/ant-tptp.jar" />
292
        	</fileset>
293
    	</copy>
253
	</target>
294
	</target>
254
295
255
	<target name="setupRemoteMachine">
296
	<target name="setupRemoteMachine">
Lines 259-285 Link Here
259
		<echo message="Copying All-In-One and Agent Controller to Remote Machine" />
300
		<echo message="Copying All-In-One and Agent Controller to Remote Machine" />
260
		<sshexec host="${hostname}" username="${user}" command="mkdir ${dir}/workbench; mkdir ${dir}/ac" keyfile="${keyfile}" passphrase="" trust="true" />
301
		<sshexec host="${hostname}" username="${user}" command="mkdir ${dir}/workbench; mkdir ${dir}/ac" keyfile="${keyfile}" passphrase="" trust="true" />
261
		<scp file="${tempDir}/${tptpDriver}" todir="${user}@${hostname}:${dir}/workbench/" keyfile="${keyfile}" passphrase="" trust="true" />
302
		<scp file="${tempDir}/${tptpDriver}" todir="${user}@${hostname}:${dir}/workbench/" keyfile="${keyfile}" passphrase="" trust="true" />
262
		<scp file="${tempDir}/${acwinDriver}" todir="${user}@${hostname}:${dir}/ac/" keyfile="${keyfile}" passphrase="" trust="true" />
303
		<scp file="${tempDir}/${acDriver}" todir="${user}@${hostname}:${dir}/ac/" keyfile="${keyfile}" passphrase="" trust="true" />
263
304
264
        <echo message="Extracting All-In-One and Agent Controller on Remote Machine" />
305
        <echo message="Extracting Agent Controller on Remote Machine" />
265
		<sshexec host="${hostname}" username="${user}" command="unzip -q ${dir}/ac/${acwinDriver} -d ${dir}/ac; chmod -R +x ${dir}/ac; unzip -q ${dir}/workbench/${tptpDriver} -d ${dir}/workbench; chmod -R +x ${dir}/workbench/eclipse" keyfile="${keyfile}" passphrase="" trust="true" />
306
		<sshexec host="${hostname}" username="${user}" command="unzip -q ${dir}/ac/${acDriver} -d ${dir}/ac; chmod -R +x ${dir}/ac" keyfile="${keyfile}" passphrase="" trust="true" />
266
307
267
	</target>
308
	</target>
268
309
269
    <target name="cleanupRemote">
310
    <target name="cleanupRemote">
270
        <echo message="Shutting down the agent controller on the remote machine" />
311
        <echo message="Shutting down the agent controller on the remote machine" />
271
        <sshexec host="${hostname}" username="${user}" command="${dir}/ac/bin/acserver -shutdown" keyfile="${keyfile}" passphrase="" trust="true" failonerror="false" />
312
        <sshexec host="${hostname}" username="${user}" command="${dir}/ac/bin/ACServer -shutdown" keyfile="${keyfile}" passphrase="" trust="true" failonerror="false" />
272
        <echo message="Removing agent controller and workbench directories on the remote machine" />
313
        <echo message="Removing agent controller and workbench directories on the remote machine" />
273
        <sshexec host="${hostname}" username="${user}" command="rm -fr ${dir}/ac; rm -fr ${dir}/workbench" keyfile="${keyfile}" passphrase="" trust="true" failonerror="false"/>
314
        <sshexec host="${hostname}" username="${user}" command="rm -fr ${dir}/ac; rm -fr ${dir}/workbench" keyfile="${keyfile}" passphrase="" trust="true" failonerror="false"/>
274
    </target>
315
    </target>
275
316
276
    <target name="cleanupDownloads">
317
    <target name="cleanupDownloads">
318
	<antcall target="time"/>
277
        <!-- Remove download directory -->
319
        <!-- Remove download directory -->
278
        <echo message="Removing download directory" />
320
        <echo message="Removing download directory" />
279
        <delete dir="${tempDir}" failonerror="false" />
321
        <delete dir="${tempDir}" failonerror="false" />
280
    </target>
322
    </target>
281
323
282
    <target name="cleanupLocal" depends="cleanupWorkspace, cleanupReports">
324
    <target name="cleanupLocal" depends="cleanupWorkspace">
283
        <!-- Remove eclipse -->
325
        <!-- Remove eclipse -->
284
        <echo message="Removing eclipse directory" />
326
        <echo message="Removing eclipse directory" />
285
        <delete dir="${eclipse.home}" failonerror="false" />
327
        <delete dir="${eclipse.home}" failonerror="false" />
Lines 298-336 Link Here
298
    </target>
340
    </target>
299
341
300
	<target name="extractTests">
342
	<target name="extractTests">
301
		<echo message="Extracting Monitor" />
343
		<antcall target="time"/>
302
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d monitor test-results/monitor" reallyquiet="true"/>
344
		<echo message="Extracting Monitor"/>
303
		
345
		<echo message="nothing to extract, skipping" />
304
		<echo message="Removing org.eclipse.tptp.monitoring.notifications.test" />
346
		<!-- No monitor tests, if tests are added update import to include this directory -->
305
		<delete dir="monitor/org.eclipse.tptp.monitoring.notifications.test" />
347
		<!--<delete dir="monitor" failonerror="false" />-->
348
		<!--<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d monitor test-results/monitor" reallyquiet="true"/>-->
306
349
307
		<echo message="Extracting Platform" />
350
		<echo message="Extracting Platform" />
308
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform test-results/platform" reallyquiet="true"/>
351
		<delete dir="platform" failonerror="false" />
352
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.hyades.probekit.tests test-results/platform/org.eclipse.hyades.probekit.tests" reallyquiet="true"/>
353
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.hyades.tests test-results/platform/org.eclipse.hyades.tests" reallyquiet="true"/>
354
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.hyades.trace.ui.tests test-results/platform/org.eclipse.hyades.trace.ui.tests" reallyquiet="true"/>
355
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.hyades.use.cases test-results/platform/org.eclipse.hyades.use.cases" reallyquiet="true"/>
356
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.tptp.ac.testautomation test-results/platform/org.eclipse.tptp.ac.testautomation" reallyquiet="true"/>
357
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.tptp.platform.common.ui.tests test-results/platform/org.eclipse.tptp.platform.common.ui.tests" reallyquiet="true"/>
358
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d platform/org.eclipse.tptp.platform.report.tests test-results/platform/org.eclipse.tptp.platform.report.tests" reallyquiet="true"/>
309
359
310
		<echo message="Extracting Test" />
360
		<echo message="Extracting Test" />
311
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test test-results/test" reallyquiet="true"/>
361
		<delete dir="test" failonerror="false" />
362
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.execution.harness.tests test-results/test/org.eclipse.hyades.execution.harness.tests" reallyquiet="true"/>
363
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.core.services.tests test-results/test/org.eclipse.hyades.test.core.services.tests" reallyquiet="true"/>
364
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.core.tests test-results/test/org.eclipse.hyades.test.core.tests" reallyquiet="true"/>
365
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.java.tests test-results/test/org.eclipse.hyades.test.java.tests" reallyquiet="true"/>
366
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.tools.core.tests test-results/test/org.eclipse.hyades.test.tools.core.tests" reallyquiet="true"/>
367
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.ui.datapool.tests test-results/test/org.eclipse.hyades.test.ui.datapool.tests" reallyquiet="true"/>
368
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.ui.logViewer.tests test-results/test/org.eclipse.hyades.test.ui.logViewer.tests" reallyquiet="true"/>
369
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.ui.navigator.tests test-results/test/org.eclipse.hyades.test.ui.navigator.tests" reallyquiet="true"/>
370
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.hyades.test.URLTest.tests test-results/test/org.eclipse.hyades.test.URLTest.tests" reallyquiet="true"/>
371
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.tptp.test.auto.gui.tests test-results/test/org.eclipse.tptp.test.auto.gui.tests" reallyquiet="true"/>
372
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d test/org.eclipse.tptp.test.testservices.tests test-results/test/org.eclipse.tptp.test.testservices.tests" reallyquiet="true"/>
312
373
313
		<echo message="Extracting Trace" />
374
		<echo message="Extracting Trace" />
314
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d trace test-results/trace" reallyquiet="true"/>
375
		<delete dir="trace" failonerror="false" />
376
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d trace/org.eclipse.tptp.trace.use.cases test-results/trace/org.eclipse.tptp.trace.use.cases" reallyquiet="true"/>
377
		<antcall target="time"/>
378
	</target>
315
379
380
	<target name="import">
381
		<antcall target="time"/>
382
		<echo message="Cleanup workspace, if it exists"/>
383
		<delete dir="${tptp.test.workspace}" failonerror="false"/>
316
		<mkdir dir="${tptp.test.workspace}" />
384
		<mkdir dir="${tptp.test.workspace}" />
385
		<echo message="Copying extracted tests to workspace" />
386
		<copy todir="${tptp.test.workspace}">
387
           	<!--<fileset dir="monitor/" /> No monitor tests, if any are checked out, add this back -->
388
        	<fileset dir="platform/" />
389
        	<fileset dir="test/" />
390
        	<fileset dir="trace/" />
391
	    </copy>
317
392
318
		<echo message="Moving to Workspace" />
393
		<echo message="Updating BVT test results"/>
319
		<move todir="${tptp.test.workspace}">
394
		<delete dir="${tptp.test.workspace}/org.eclipse.hyades.tests/BVT_results" />
320
            <fileset dir="monitor/" />
395
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co -r ${cvsBranch} -d temp_BVT_results test-results/platform/org.eclipse.hyades.tests/BVT_results" reallyquiet="true"/>
321
            <fileset dir="platform/" />
396
		<copy todir="${tptp.test.workspace}/org.eclipse.hyades.tests/BVT_results">
322
            <fileset dir="test/" />
397
        	<fileset dir="temp_BVT_results/" />
323
            <fileset dir="trace/" />
398
		</copy>
324
        </move>
399
		<delete dir="temp_BVT_results" />
325
326
		<echo message="Cleaning up extract" />
327
		<delete dir="monitor" />
328
		<delete dir="platform" />
329
		<delete dir="test" />
330
		<delete dir="trace" />
331
	</target>
332
400
333
	<target name="import">
334
		<echo message="Before import into workspace"/>
401
		<echo message="Before import into workspace"/>
335
		<tptp:importExistingProjects>
402
		<tptp:importExistingProjects>
336
			<fileset dir="${tptp.test.workspace}">
403
			<fileset dir="${tptp.test.workspace}">
Lines 340-363 Link Here
340
		<echo message="After import into workspace"/>
407
		<echo message="After import into workspace"/>
341
	</target>
408
	</target>
342
409
343
	<target name="configureRemoteMachine">
410
	<target name="configureRemoteMachine" depends="setupRemoteMachine">
411
		<antcall target="time"/>
412
		<echo message="Cleaning up workbench on Remote Machine" />
413
		<sshexec host="${hostname}" username="${user}" command="rm -rf ${dir}/workbench/eclipse; rm -rf $TEMP/build" keyfile="${keyfile}" passphrase="" trust="true" />
414
		
415
		<echo message="Extracting All-In-One and JRE on Remote Machine" />
416
		<sshexec host="${hostname}" username="${user}" command="unzip -q ${dir}/workbench/${tptpDriver} -d ${dir}/workbench; cp -r ${dir}/jre/${targetJRE}/jre ${dir}/workbench/eclipse; chmod -R +x ${dir}/workbench/eclipse" keyfile="${keyfile}" passphrase="" trust="true" />
417
418
		<echo message="Configuring Agent Controller on Remote Machine" />
419
		<sshexec host="${hostname}" username="${user}" command="cd ${dir}/ac/bin; ./SetConfig.bat -s JAVA_PATH=${cygwinPath}\\workbench\\eclipse\\jre\\bin\\java.exe TYPE=ALL SECURITY=FALSE" keyfile="${keyfile}" passphrase="" trust="true" />
420
		
421
		<echo message="Shutting down the agent controller on the remote machine" />
422
        <sshexec host="${hostname}" username="${user}" command="${dir}/ac/bin/ACServer -shutdown" keyfile="${keyfile}" passphrase="" trust="true" failonerror="false" />
423
344
	    <echo message="Starting Agent Controller on Remote Machine" />
424
	    <echo message="Starting Agent Controller on Remote Machine" />
345
	    <java classname="AcConfigMain" fork="true">
425
		<echo message="A timeout is set to allow for disconnecting since the AC continues to run"/>
346
	     <classpath>
426
		<sshexec host="${hostname}" username="${user}" command="cd ${dir}/ac/bin; ./ACServer.exe &amp;" keyfile="${keyfile}" passphrase="" trust="true" timeout="1000" failonerror="false" />
347
	        <pathelement location="bin/AcConfig.jar"/>
427
		<!-- add a test condition based on the result to exit with an error if it is not running -->
348
	        <pathelement location="bin/DialogueUtil-20071120.jar"/>
428
		<sshexec host="${hostname}" username="${user}" command="ps -ef | grep ACServer | wc -l" keyfile="${keyfile}" passphrase="" trust="true" />
349
	        <pathelement location="bin/ganymed-ssh2-build211beta4.jar"/>
350
	     </classpath>
351
	     <arg value="${javaLocation}" />
352
	     <arg value="${acUser}" />
353
	     <arg value="${acPassword}" />
354
	     <arg value="${cygwinACPath}" />
355
	    </java>
356
	</target>
429
	</target>
357
430
358
	<target name="checkInReport">
431
	<target name="checkInReport">
359
	    <mkdir dir="${basedir}/${reportCheckinDirectory}" />
432
	    <mkdir dir="${basedir}/${reportCheckinDirectory}" />
360
	    <cvs command="-d ${cvs.login}:/cvsroot/org.eclipse co -d ${reportCheckinDirectory} www/tptp/test/reports/${reportCheckinDirectory}" reallyquiet="true"/>
433
	    <cvs command="-d ${cvs.login}:/cvsroot/org.eclipse co -r ${cvsBranch} -d ${reportCheckinDirectory} www/tptp/test/reports/${reportCheckinDirectory}" reallyquiet="true"/>
361
434
362
	    <delete>
435
	    <delete>
363
	        <fileset dir="${basedir}/${reportCheckinDirectory}" includes="*.html" />
436
	        <fileset dir="${basedir}/${reportCheckinDirectory}" includes="*.html" />
Lines 377-385 Link Here
377
	</target>
450
	</target>
378
451
379
	<target name="copyBVTReport">
452
	<target name="copyBVTReport">
380
	    <scp todir="${reportUser}@${reportHostname}:/home/data/users/${reportUser}/downloads/tptp/${release}/dev/${driver}/BVT" keyfile="${keyfile}" passphrase="" trust="true">
453
		<exec executable="bash">
381
	        <fileset dir="${reportLocation}"/>
454
			<arg line="-c \'scp -r -i ${keyfile} ${reportLocation}/* ${reportHost}:${remoteReportLocation}\'" />
382
	    </scp>
455
		</exec>
383
	</target>
456
	</target>
384
457
385
</project>
458
    <target name="checkInBVT">
459
		<antcall target="time"/>
460
		<!-- Look into handling for branches -->
461
		<condition property="bvtBranch" value="-r ${cvsBranch}" else="">
462
			<not>
463
				<equals arg1="${cvsBranch}" arg2="HEAD" />
464
			</not>
465
		</condition>
466
		<cvs command="-d ${cvs.login}:/cvsroot/tptp co ${bvtBranch} -d BVT_results test-results/platform/org.eclipse.hyades.tests/BVT_results" reallyquiet="true"/>
467
		<delete>
468
			<fileset dir="${basedir}/BVT_results" includes="*.execution" />
469
        </delete>
470
		<copy todir="BVT_results" overwrite="true">
471
        	<fileset dir="${tptp.test.workspace}/org.eclipse.hyades.tests/BVT_results">
472
            	<include name="*.execution" />
473
        	</fileset>
474
        </copy>
475
		<echo message="BVT results for ${tptpAllDriver}" file="${basedir}/commitMessage.txt" />
476
		<exec executable="bash">
477
        	<arg line="-c \'cd ${basedir}/BVT_results; cvs add -kb *; cvs commit -F ${basedir}/commitMessage.txt; cd .. *\' " />
478
        </exec>
479
		<delete dir="BVT_results" failonerror="false" />
480
	</target>
481
482
	<target name="time">
483
		<exec executable="date"/>
484
	</target>
485
486
487
</project>
(-)org/eclipse/tptp/platform/releng/tools/testautomation/dependencySetup.sh (-108 / +74 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
############################################################################### 
2
############################################################################### 
3
# Copyright (c) 2008 IBM Corporation and others.
3
# Copyright (c) 2008, 2010 IBM Corporation and others.
4
# All rights reserved.   This program and the accompanying materials
4
# All rights reserved.   This program and the accompanying materials
5
# are made available under the terms of the Eclipse Public License v1.0
5
# are made available under the terms of the Eclipse Public License v1.0
6
# which accompanies this distribution, and is available at
6
# which accompanies this distribution, and is available at
Lines 19-34 Link Here
19
    exit 1
19
    exit 1
20
fi
20
fi
21
21
22
export baseURL="http://download.eclipse.org"
23
export baseArchiveURL="http://archive.eclipse.org"
22
export common=tptp/$tptpRelease/dev/$tptpDriver
24
export common=tptp/$tptpRelease/dev/$tptpDriver
23
export tptpDep=http://download.eclipse.org/$common/dependencies.txt
25
export commonRelease=tptp/$tptpRelease/$tptpDriver
26
export tptpDep=$baseURL/$common/dependencies.txt
24
wget --spider $tptpDep -o bvt$tptpDriver.log
27
wget --spider $tptpDep -o bvt$tptpDriver.log
25
error=`grep -c 404: bvt$tptpDriver.log`
28
error=`grep -c 404: bvt$tptpDriver.log`
26
29
27
if [ $error != 0 ]; then
30
if [ $error != 0 ]; then
28
    export common=tptp/$tptpRelease/$tptpDriver
31
    export common=tptp/$tptpRelease/$tptpDriver
29
    export tptpDep=http://download.eclipse.org/$common/dependencies.txt
30
fi
32
fi
31
wget -nv $tptpDep
33
wget -nv -O dependencies.txt http://www.eclipse.org/tptp/home/downloads/?buildId=$tptpDriver
32
34
33
echo "#Driver dependencies" > dependencies.properties
35
echo "#Driver dependencies" > dependencies.properties
34
echo "release=$tptpRelease" >> dependencies.properties
36
echo "release=$tptpRelease" >> dependencies.properties
Lines 37-90 Link Here
37
#Download drivers for setup
39
#Download drivers for setup
38
echo "Getting TPTP Drivers"
40
echo "Getting TPTP Drivers"
39
41
40
#TPTP Linux All-In-One
42
#TPTP Runtime All Plugins
41
export tptpLinuxUrl=http://fullmoon.torolab.ibm.com/$common/tptp.runtime.allInOne.linux.gtk.x86-$tptpDriver.zip
43
export tptpAllUrl=$baseURL/$common/tptp.runtime-$tptpDriver.zip
42
wget --spider $tptpLinuxUrl -o bvt$tptpDriver.log
44
wget --spider $tptpAllUrl -o bvt$tptpDriver.log
43
45
44
error=`grep -c 404: bvt$tptpDriver.log`
46
error=`grep -c 404: bvt$tptpDriver.log`
45
if [ $error != 0 ]; then
47
if [ $error != 0 ]; then
46
    export tptpLinuxUrl=http://download.eclipse.org/$common/tptp.runtime.allInOne.linux.gtk.x86-$tptpDriver.zip
48
    export tptpAllUrl=$baseURL/$commonRelease/tptp.runtime-$tptpDriver.zip
47
fi
49
fi
48
50
49
echo "tptpLinuxUrl=$tptpLinuxUrl" >> dependencies.properties
51
echo "tptpAllUrl=$tptpAllUrl" >> dependencies.properties
52
echo "tptpAllDriver=tptp.runtime-$tptpDriver.zip" >> dependencies.properties
50
echo "tptpLinuxDriver=tptp.runtime.allInOne.linux.gtk.x86-$tptpDriver.zip" >> dependencies.properties
53
echo "tptpLinuxDriver=tptp.runtime.allInOne.linux.gtk.x86-$tptpDriver.zip" >> dependencies.properties
51
52
#TPTP Windows All-In-One
53
export tptpWinUrl=http://fullmoon.torolab.ibm.com/$common/tptp.runtime.allInOne.win32.win32.x86-$tptpDriver.zip
54
wget --spider $tptpWinUrl -o bvt$tptpDriver.log
55
56
error=`grep -c 404: bvt$tptpDriver.log`
57
if [ $error != 0 ]; then
58
    export tptpWinUrl=http://download.eclipse.org/$common/tptp.runtime.allInOne.win32.win32.x86-$tptpDriver.zip
59
fi
60
61
echo "tptpWinUrl=$tptpWinUrl" >> dependencies.properties
62
echo "tptpWinDriver=tptp.runtime.allInOne.win32.win32.x86-$tptpDriver.zip" >> dependencies.properties
54
echo "tptpWinDriver=tptp.runtime.allInOne.win32.win32.x86-$tptpDriver.zip" >> dependencies.properties
63
55
64
65
#Windows Agent Controller
56
#Windows Agent Controller
66
export acwinUrl=http://fullmoon.torolab.ibm.com/$common/agntctrl.win_ia32-$tptpDriver.zip
57
export acWinUrl=http://fullmoon.torolab.ibm.com/$common/agntctrl.win_ia32-$tptpDriver.zip
67
wget --spider $acwinUrl -o bvt$tptpDriver.log
58
wget --spider $acWinUrl -o bvt$tptpDriver.log
68
59
69
error=`grep -c 404: bvt$tptpDriver.log`
60
error=`grep -c 404: bvt$tptpDriver.log`
70
if [ $error != 0 ]; then
61
if [ $error != 0 ]; then
71
    export acwinUrl=http://download.eclipse.org/$common/agntctrl.win_ia32-$tptpDriver.zip
62
    export acWinUrl=$baseURL/$common/agntctrl.win_ia32-$tptpDriver.zip
72
fi
63
fi
73
64
74
echo "acwinUrl=$acwinUrl" >> dependencies.properties
65
echo "acWinUrl=$acWinUrl" >> dependencies.properties
75
echo "acwinDriver=agntctrl.win_ia32-$tptpDriver.zip" >> dependencies.properties
66
echo "acWinDriver=agntctrl.win_ia32-$tptpDriver.zip" >> dependencies.properties
76
67
77
#Api Recorder Framework
68
#Linux Agent Controller
78
export apiRecFrameworkUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.test.tools.api-$tptpDriver.zip
69
export acLinuxUrl=http://fullmoon.torolab.ibm.com/$common/agntctrl.linux_ia32-$tptpDriver.zip
79
wget --spider $apiRecFrameworkUrl -o bvt$tptpDriver.log
70
wget --spider $acLinuxUrl -o bvt$tptpDriver.log
80
71
81
error=`grep -c 404: bvt$tptpDriver.log`
72
error=`grep -c 404: bvt$tptpDriver.log`
82
if [ $error != 0 ]; then
73
if [ $error != 0 ]; then
83
    export apiRecFrameworkUrl=http://download.eclipse.org/$common/org.eclipse.tptp.test.tools.api-$tptpDriver.zip
74
    export acLinuxUrl=$baseURL/$common/agntctrl.linux_ia32-$tptpDriver.zip
84
fi
75
fi
85
76
86
echo "apiRecFrameworkUrl=$apiRecFrameworkUrl" >> dependencies.properties
77
echo "acLinuxUrl=$acLinuxUrl" >> dependencies.properties
87
echo "apiRecFrameworkDriver=org.eclipse.tptp.test.tools.api-$tptpDriver.zip" >> dependencies.properties
78
echo "acLinuxDriver=agntctrl.linux_ia32-$tptpDriver.zip" >> dependencies.properties
88
79
89
#AGR
80
#AGR
90
export agrUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.test.auto-$tptpDriver.zip
81
export agrUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.test.auto-$tptpDriver.zip
Lines 92-198 Link Here
92
83
93
error=`grep -c 404: bvt$tptpDriver.log`
84
error=`grep -c 404: bvt$tptpDriver.log`
94
if [ $error != 0 ]; then
85
if [ $error != 0 ]; then
95
    export agrUrl=http://download.eclipse.org/$common/org.eclipse.tptp.test.auto-$tptpDriver.zip
86
    export agrUrl=$baseURL/$common/org.eclipse.tptp.test.auto-$tptpDriver.zip
96
fi
87
fi
97
88
98
echo "agrUrl=$agrUrl" >> dependencies.properties
89
echo "agrUrl=$agrUrl" >> dependencies.properties
99
echo "agrDriver=org.eclipse.tptp.test.auto-$tptpDriver.zip" >> dependencies.properties
90
echo "agrDriver=org.eclipse.tptp.test.auto-$tptpDriver.zip" >> dependencies.properties
100
91
101
#Log and Trace Analyzer
102
export ltaUrl=http://fullmoon.torolab.ibm.com/$common/tptp.lta.runtime-$tptpDriver.zip
103
wget --spider $ltaUrl -o bvt$tptpDriver.log
104
105
error=`grep -c 404: bvt$tptpDriver.log`
106
if [ $error != 0 ]; then
107
    export ltaUrl=http://download.eclipse.org/$common/tptp.lta.runtime-$tptpDriver.zip
108
fi
109
110
echo "ltaUrl=$ltaUrl" >> dependencies.properties
111
echo "ltaDriver=tptp.lta.runtime-$tptpDriver.zip" >> dependencies.properties
112
113
#Test BIRT Reporting
92
#Test BIRT Reporting
114
export testReportBirtUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.test.report.birt-$tptpDriver.zip
93
export testReportBirtUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.test.report.birt-$tptpDriver.zip
115
wget --spider $testReportBirtUrl -o bvt$tptpDriver.log
94
wget --spider $testReportBirtUrl -o bvt$tptpDriver.log
116
95
117
error=`grep -c 404: bvt$tptpDriver.log`
96
error=`grep -c 404: bvt$tptpDriver.log`
118
if [ $error != 0 ]; then
97
if [ $error != 0 ]; then
119
    export testReportBirtUrl=http://download.eclipse.org/$common/org.eclipse.tptp.test.report.birt-$tptpDriver.zip
98
    export testReportBirtUrl=$baseURL/$common/org.eclipse.tptp.test.report.birt-$tptpDriver.zip
120
fi
99
fi
121
100
122
echo "testReportBirtUrl=$testReportBirtUrl" >> dependencies.properties
101
echo "testReportBirtUrl=$testReportBirtUrl" >> dependencies.properties
123
echo "testReportBirtDriver=org.eclipse.tptp.test.report.birt-$tptpDriver.zip" >> dependencies.properties
102
echo "testReportBirtDriver=org.eclipse.tptp.test.report.birt-$tptpDriver.zip" >> dependencies.properties
124
103
125
#Monitoring BIRT Reporting
126
export monitorReportBirtUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.monitoring.report.birt-$tptpDriver.zip
127
wget --spider $monitorReportBirtUrl -o bvt$tptpDriver.log
128
129
error=`grep -c 404: bvt$tptpDriver.log`
130
if [ $error != 0 ]; then
131
    export monitorReportBirtUrl=http://download.eclipse.org/$common/org.eclipse.tptp.monitoring.report.birt-$tptpDriver.zip
132
fi
133
134
echo "monitorReportBirtUrl=$monitorReportBirtUrl" >> dependencies.properties
135
echo "monitorReportBirtDriver=org.eclipse.tptp.monitoring.report.birt-$tptpDriver.zip" >> dependencies.properties
136
137
#Trace BIRT Reporting
104
#Trace BIRT Reporting
138
export traceReportBirtUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.trace.report.birt-$tptpDriver.zip
105
export traceReportBirtUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.trace.report.birt-$tptpDriver.zip
139
wget --spider $traceReportBirtUrl -o bvt$tptpDriver.log
106
wget --spider $traceReportBirtUrl -o bvt$tptpDriver.log
140
107
141
error=`grep -c 404: bvt$tptpDriver.log`
108
error=`grep -c 404: bvt$tptpDriver.log`
142
if [ $error != 0 ]; then
109
if [ $error != 0 ]; then
143
    export traceReportBirtUrl=http://download.eclipse.org/$common/org.eclipse.tptp.trace.report.birt-$tptpDriver.zip
110
    export traceReportBirtUrl=$baseURL/$common/org.eclipse.tptp.trace.report.birt-$tptpDriver.zip
144
fi
111
fi
145
112
146
echo "traceReportBirtUrl=$traceReportBirtUrl" >> dependencies.properties
113
echo "traceReportBirtUrl=$traceReportBirtUrl" >> dependencies.properties
147
echo "traceReportBirtDriver=org.eclipse.tptp.trace.report.birt-$tptpDriver.zip" >> dependencies.properties
114
echo "traceReportBirtDriver=org.eclipse.tptp.trace.report.birt-$tptpDriver.zip" >> dependencies.properties
148
115
149
#Platform BIRT Reporting
116
# Put the url entries on one line
150
export platformReportBirtUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.platform.statistical.report.birt-$tptpDriver.zip
117
sed -i 's/<a/\n/g' dependencies.txt
151
wget --spider $platformReportBirtUrl -o bvt$tptpDriver.log
118
# Make the file to search only on links
152
119
grep href dependencies.txt >mydependencies.txt
153
error=`grep -c 404: bvt$tptpDriver.log`
120
154
if [ $error != 0 ]; then
121
eclipseSDKUrl=`grep "Eclipse SDK" mydependencies.txt | cut -d\" -f2`
155
    export platformReportBirtUrl=http://download.eclipse.org/$common/org.eclipse.tptp.platform.statistical.report.birt-$tptpDriver.zip
122
echo "eclipseSDKUrl=$eclipseSDKUrl" >> dependencies.properties
156
fi
123
157
124
158
echo "platformReportBirtUrl=$platformReportBirtUrl" >> dependencies.properties
125
eclipseSDKUrl=`grep "Eclipse SDK" mydependencies.txt | cut -d\" -f2`
159
echo "platformReportBirtDriver=org.eclipse.tptp.platform.statistical.report.birt-$tptpDriver.zip" >> dependencies.properties
126
# Conditional statement to account for eclipse Milestone Releases.
160
127
if ( echo $eclipseSDKUrl | egrep -q "M[0-9]|RC[0-9]|R-[0-9]" ); then
161
#Perfmon
128
        eclipseZip=`echo ${eclipseSDKUrl##*/} | cut -d'-' -f2`
162
export perfmonUrl=http://fullmoon.torolab.ibm.com/tptp/4.4.0.3/TPTP-4.4.0.3/perfmon.client-TPTP-4.4.0.3.zip
129
else
163
wget --spider $perfmonUrl -o bvt$tptpDriver.log
130
        eclipseZip=`echo ${eclipseSDKUrl##*/}`
164
131
fi
165
error=`grep -c 404: bvt$tptpDriver.log`
132
# Check for eclipse maintenance releases, which will have been flagged as an M build above since they also contain an 'M' followed by a number in the URL
166
if [ $error != 0 ]; then
133
if ( echo $eclipseSDKUrl | egrep -q "M[0-9][0-9][0-9][0-9]" ); then
167
    export perfmonUrl=http://download.eclipse.org/tptp/4.4.0.3/TPTP-4.4.0.3/perfmon.client-TPTP-4.4.0.3.zip
134
        eclipseZip=`echo ${eclipseSDKUrl##*/}`
168
fi
135
fi
169
136
echo "eclipseSDKUrl=$eclipseSDKUrl" >> dependencies.properties
170
echo "perfmonUrl=$perfmonUrl" >> dependencies.properties
137
echo "eclipseWinSDKDriver=eclipse-SDK-${eclipseZip}-win32.zip" >> dependencies.properties
171
echo "perfmonDriver=perfmon.client-TPTP-4.4.0.3.zip" >> dependencies.properties
138
echo "eclipseLinuxSDKDriver=eclipse-SDK-${eclipseZip}-linux-gtk.tar.gz" >> dependencies.properties
172
139
173
#C/C++ Code Review
140
emfUrl=$baseURL`grep emf- mydependencies.txt | grep -v 2.2.4 | cut -d\" -f2 | cut -d= -f2`
174
export codereviewCppUrl=http://fullmoon.torolab.ibm.com/$common/org.eclipse.tptp.platform.analysis.codereview.cpp-$tptpDriver.zip
141
echo "emfUrl=$emfUrl" >> dependencies.properties
175
wget --spider $codereviewCppUrl -o bvt$tptpDriver.log
142
echo "emfDriver=`echo ${emfUrl##*/}`" >> dependencies.properties
176
143
177
error=`grep -c 404: bvt$tptpDriver.log`
144
xsdUrl=$baseURL`grep xsd mydependencies.txt | grep -v 2.2.4 | cut -d\" -f2 | cut -d= -f2`
178
if [ $error != 0 ]; then
145
echo "xsdUrl=$xsdUrl" >> dependencies.properties
179
    export codereviewCppUrl=http://download.eclipse.org/$common/org.eclipse.tptp.platform.analysis.codereview.cpp-$tptpDriver.zip
146
echo "xsdDriver=`echo ${xsdUrl##*/}`" >> dependencies.properties
180
fi
147
181
148
wtpUrl=$baseURL`grep wtp mydependencies.txt | cut -d\" -f2 | cut -d= -f2`
182
echo "codereviewCppUrl=$codereviewCppUrl" >> dependencies.properties
149
echo "wtpUrl=$wtpUrl" >> dependencies.properties
183
echo "codereviewCppDriver=org.eclipse.tptp.platform.analysis.codereview.cpp-$tptpDriver.zip" >> dependencies.properties
150
echo "wtpDriver=`echo ${wtpUrl##*/}`" >> dependencies.properties
184
151
185
152
birtUrl=$baseURL`grep birt-report-framework mydependencies.txt | cut -d\" -f2 | cut -d= -f2`
186
sed 's/<br>/\n/g' <dependencies.txt >mydependencies.txt
153
echo "birtUrl=$birtUrl" >> dependencies.properties
187
echo "wtpUrl=`grep wtp mydependencies.txt | cut -d\\\" -f2`" >> dependencies.properties
154
echo "birtDriver=`echo ${birtUrl##*/}`" >> dependencies.properties
188
echo "wtpDriver=`grep wtp mydependencies.txt | cut -d">" -f2 | cut -d"<" -f1`" >> dependencies.properties
155
189
echo "birtUrl=`grep birt-report-framework mydependencies.txt | cut -d\\\" -f2`" >> dependencies.properties
156
gefUrl=$baseURL`grep GEF-runtime mydependencies.txt | cut -d\" -f2 | cut -d= -f2`
190
echo "birtDriver=`grep birt-report-framework mydependencies.txt | cut -d">" -f2 | cut -d"<" -f1`" >> dependencies.properties
157
echo "gefUrl=$gefUrl" >> dependencies.properties
191
echo "gefUrl=`grep GEF-runtime mydependencies.txt | cut -d\\\" -f2`" >> dependencies.properties
158
echo "gefDriver=`echo ${gefUrl##*/}`" >> dependencies.properties
192
echo "gefDriver=`grep GEF-runtime mydependencies.txt | cut -d">" -f2 | cut -d"<" -f1`" >> dependencies.properties
159
193
echo "dtpUrl=`grep dtp mydependencies.txt | cut -d\\\" -f2`" >> dependencies.properties
160
dtpUrl=$baseURL`grep dtp mydependencies.txt | cut -d\" -f2 | cut -d= -f2`
194
echo "dtpDriver=`grep dtp mydependencies.txt | cut -d">" -f2 | cut -d"<" -f1`" >> dependencies.properties
161
echo "dtpUrl=$dtpUrl" >> dependencies.properties
195
echo "cdtUrl=`grep cdt mydependencies.txt | cut -d\\\" -f2`" >> dependencies.properties
162
echo "dtpDriver=`echo ${dtpUrl##*/}`" >> dependencies.properties
196
echo "cdtDriver=`grep cdt mydependencies.txt | cut -d">" -f2 | cut -d"<" -f1`" >> dependencies.properties
197
163
198
rm dependencies.txt mydependencies.txt bvt$tptpDriver.log
164
rm dependencies.txt mydependencies.txt bvt$tptpDriver.log
(-)org/eclipse/tptp/platform/releng/tools/testautomation/nightly.sh (-18 / +70 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
############################################################################### 
2
############################################################################### 
3
# Copyright (c) 2008 IBM Corporation and others.
3
# Copyright (c) 2008, 2010 IBM Corporation and others.
4
# All rights reserved.   This program and the accompanying materials
4
# All rights reserved.   This program and the accompanying materials
5
# are made available under the terms of the Eclipse Public License v1.0
5
# are made available under the terms of the Eclipse Public License v1.0
6
# which accompanies this distribution, and is available at
6
# which accompanies this distribution, and is available at
Lines 11-55 Link Here
11
# IBM - Initial API and implementation
11
# IBM - Initial API and implementation
12
###############################################################################
12
###############################################################################
13
13
14
export runType=$1
15
export tptpRelease=$2
16
export propertyFile=$3
17
export reportStartTime=$4
18
export reportEndTime=$5
19
20
if [ "$#" -lt 3 ]; then
14
if [ "$#" -lt 3 ]; then
21
    echo -e "Usage:\n\t$0 <type of run> <release> <property file> [ <report start time> <report end time> ], e.g. $0 bvt|report 4.5.0 `pwd`\test.properties [ \"`date +\"%m/%d/%Y %l:%M %P\"`\"  \"`date +\"%m/%d/%Y %l:%M %P\"`\" ]"
15
    echo -e "Usage:\n\t$0 --runType=<type of run> --tptpRelease=<release> --propertyFile=<property file> \
16
    [ --jreList=<jre list> --reportStartTime=<report start time> --reportEndTime=<report end time> ], \
17
    e.g. $0 --runType=bvt|report --tptpRelease=4.5.0 --propertyFile=`pwd`/test.properties \
18
    [ --jreList=jre1.4,jre1.5 --reportStartTime=\"`date +\"%m/%d/%Y %l:%M %P\"`\" --reportEndTime=\"`date +\"%m/%d/%Y %l:%M %P\"`\" ]"
22
    exit 1
19
    exit 1
23
fi
20
fi
24
21
22
# Setup the environment variables, modified from org.eclipse.hyades.releng.builder/master/bash/convert-parameters-into-variables.sf
23
for i in "$@"; do
24
	attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
25
	if [ -n "$attr" ]; then
26
		export "$attr"
27
	fi
28
done
29
30
# Verify the required variables, modified from org.eclipse.hyades.releng.builder/master/bash/verify-environment-variables.sf
31
for i in "$@"; do
32
	attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
33
	tmp=${runType:?"undefined run type"}
34
	tmp=${tptpRelease:?"undefined TPTP release"}
35
	tmp=${propertyFile:?"undefined property file"}
36
done
37
25
if [ "$runType" = "report" ]; then
38
if [ "$runType" = "report" ]; then
39
	# JRE List not required, so reset the values
26
    if [ x"$reportStartTime" != x ]; then
40
    if [ x"$reportStartTime" != x ]; then
27
        ./setup.sh $runType $tptpRelease $propertyFile "$reportStartTime"
41
        ./setup.sh --runType=$runType --tptpRelease=$tptpRelease --propertyFile=$propertyFile --reportStartTime="$reportStartTime"
28
    else
42
    else
29
        echo "No start time set"
43
        echo "No start time set"
30
        exit 1
44
        exit 1
31
    fi
45
    fi
32
elif [ "$runType" = "bvt" ]; then
46
elif [ "$runType" = "bvt" ]; then
33
    export currentDate=`date +%Y%m%d`
34
47
35
    wget http://www.eclipse.org/tptp/home/downloads/publish_$tptpRelease.txt
48
	# make sure no other bvt is currently running on the machine
49
	if [ -e .busy ]; then echo ".busy file found - a BVT is currently running on the machine"; exit 1; else echo "`date` - BVT Run" > .busy; fi
36
50
37
    export tptpDriver=`cat publish_$tptpRelease.txt | grep development | grep $currentDate | head -n1 | cut -d\| -f2`
51
	# Verify the required variables, modified from org.eclipse.hyades.releng.builder/master/bash/verify-environment-variables.sf
52
	for i in "$@"; do
53
		attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
54
		tmp=${jreList:?"undefined run type"}
55
	done
56
57
    wget http://www.eclipse.org/tptp/home/downloads/$tptpRelease/publish_$tptpRelease.txt
58
59
    # Find out what the latest dev driver is
60
    export tptpDriver=`cat publish_$tptpRelease.txt | grep development | head -1  | head -n1 | cut -d\| -f2`
61
    # OR comment above line, uncomment below line, and manually set to run on a specific driver specific below
62
    #tptpDriver=TPTP-4.6.2-200910311900
63
    # Set the date
64
    export currentDate=`echo $tptpDriver | cut -d- -f3`
38
65
39
    rm publish_$tptpRelease.txt
66
    rm publish_$tptpRelease.txt
40
67
41
    if [ x"$tptpDriver" != x ]; then
68
    if [ x"$tptpDriver" != x ]; then
42
        ssh tptp "cd /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/dev/$tptpDriver; if [ -e .bvt ]; then echo "BVT lock file found"; exit 1; else echo \"`date` - BVT started\" > .bvt; fi"
69
        ssh tptp "if [ ! -e /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/dev/$tptpDriver ]; then echo "Driver does not exist under dev directory"; exit 1; fi;
43
70
                  cd /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/dev/$tptpDriver; if [ -e .bvt ]; then echo "BVT lock file found"; exit 2; else echo \"`date` - BVT started\" > .bvt; fi"
71
		export common=tptp/$tptpRelease/dev/$tptpDriver
44
        if [ $? -eq 1 ]; then
72
        if [ $? -eq 1 ]; then
45
            echo "BVT already in progress";
73
        	ssh tptp "if [ ! -e /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/$tptpDriver ]; then echo "Driver does not exist at all"; exit 3; fi;
74
        			  cd /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/$tptpDriver; if [ -e .bvt ]; then echo "BVT lock file found"; exit 2; else echo \"`date` - BVT started\" > .bvt; fi"
75
        	export common=tptp/$tptpRelease/$tptpDriver
76
        fi
77
        
78
        if [ $? -eq 3 ]; then
79
            echo "No tptpDriver is found";
80
	    	rm -f .busy
46
            exit 1
81
            exit 1
47
        fi
82
        fi
48
        ./setup.sh $runType $tptpRelease $propertyFile $tptpDriver "$reportStartTime"
83
49
        ssh tptp "cd /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/dev/$tptpDriver; echo \"`date` - BVT completed\" >> .bvt"
84
        if [ $? -eq 2 ]; then
85
            echo "BVT already in progress for driver $tptpDriver";
86
	    	rm -f .busy
87
            exit 1
88
        fi
89
        
90
        logFile=$(mktemp bvtlog.XXXXXX)
91
92
        ./setup.sh --runType=$runType --tptpRelease=$tptpRelease --propertyFile=$propertyFile --tptpDriver=$tptpDriver --jreList=$jreList --reportStartTime="$reportStartTime" > $logFile 2>&1
93
		ssh tptp "cd /home/data/httpd/download.eclipse.org/$common; echo \"`date` - BVT completed\" >> .bvt"
94
        # Copy the log
95
96
		# Workaround: for some reason scp keeps the files permission of the tmp file so it can't be read on the web.
97
		chmod 664 $logFile
98
	    scp $logFile tptp:/home/data/httpd/download.eclipse.org/$common/BVT/bvtlog.txt
99
		rm $logFile
100
		rm -f .busy
50
    else
101
    else
51
        echo "No driver to test"
102
        echo "No driver to test"
103
		rm -f .busy
52
    fi
104
    fi
53
else
105
else
54
    echo "Invalid argument provided."
106
    echo "Invalid argument provided."
55
fi
107
fi
(-)org/eclipse/tptp/platform/releng/tools/testautomation/readme.html (+1 lines)
Lines 142-147 Link Here
142
	<b>reportDirectory=TP1</b><sup>2</sup> - The containing directory within the project where the test suites are located.<br/> 
142
	<b>reportDirectory=TP1</b><sup>2</sup> - The containing directory within the project where the test suites are located.<br/> 
143
	<b>reportCheckinDirectory</b><sup>2</sup> - The containing directory to store the reports for check-in.<br/>
143
	<b>reportCheckinDirectory</b><sup>2</sup> - The containing directory to store the reports for check-in.<br/>
144
	<b>reportHost</b><sup>1</sup> - The hostname of the machine to copy the test automation reports to.<br/>
144
	<b>reportHost</b><sup>1</sup> - The hostname of the machine to copy the test automation reports to.<br/>
145
	<b>remoteReportLocation</b><sup>1</sup> - Copy the results to the remote web server, for example, /home/user/www/${driverPath}/BVT.<br/>
145
	<br/>
146
	<br/>
146
	
147
	
147
	<b>tptp.test.workspace</b><sup>1,2</sup> - The location to create the workspace on the local machine.<br/>
148
	<b>tptp.test.workspace</b><sup>1,2</sup> - The location to create the workspace on the local machine.<br/>
(-)org/eclipse/tptp/platform/releng/tools/testautomation/setup.sh (-26 / +84 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
############################################################################### 
2
############################################################################### 
3
# Copyright (c) 2008 IBM Corporation and others.
3
# Copyright (c) 2008, 2010 IBM Corporation and others.
4
# All rights reserved.   This program and the accompanying materials
4
# All rights reserved.   This program and the accompanying materials
5
# are made available under the terms of the Eclipse Public License v1.0
5
# are made available under the terms of the Eclipse Public License v1.0
6
# which accompanies this distribution, and is available at
6
# which accompanies this distribution, and is available at
Lines 12-71 Link Here
12
###############################################################################
12
###############################################################################
13
13
14
#eclipse\plugins\com.jcraft.jsch_*.jar and ant-tptp.jar will be added to your ant's lib folder by the build.xml script during setupLocalMachine for Test Automation
14
#eclipse\plugins\com.jcraft.jsch_*.jar and ant-tptp.jar will be added to your ant's lib folder by the build.xml script during setupLocalMachine for Test Automation
15
export ANT_HOME=/home/build/apache-ant-1.7.0
15
export ANT_HOME=
16
export JAVA_HOME=/opt/ibm/ibm-java2-i386-50
16
export JAVA_HOME=
17
export PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin
18
17
19
export runType=$1
18
if [ x"$ANT_HOME" == x ]; then
20
export tptpRelease=$2
19
    echo "Ant home has not been set"
21
export propertyFile=$3
20
    exit 1
22
export tptpDriver=$4
21
    
23
export reportStartTime=$5
22
elif [ x"$JAVA_HOME" == x ]; then
24
export reportEndTime=$6
23
	echo "Java home has not been set"
24
    exit 1
25
fi
25
26
27
export PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin
26
28
27
if [ $# -lt 3 ]; then
29
if [ $# -lt 3 ]; then
28
    echo -e "Usage:\n\t$0 <type of run> <release> <property file> [ <driver> <report start time> <report end time> ], e.g. $0 bvt|report 4.5.0 `pwd`\test.properties [ TPTP-4.5.0-200711050917 \"`date +\"%m/%d/%Y %l:%M %P\"`\" \"`date +\"%m/%d/%Y %l:%M %P\"`\" ]"
30
    echo -e "Usage:\n\t$0 --runType=<type of run> --tptpRelease=<release> --propertyFile=<property file> \
31
    [ --tptpDriver=<driver> --jreList=<JRE list> --reportStartTime=<report start time> --reportEndTime=<report end time> ], \
32
    e.g. $0 --runType=bvt|report --tptpRelease=4.5.0 --propertyFile=`pwd`/test.properties [ --tptpDriver=TPTP-4.5.0-200711050917 \
33
    --jreList=jre1.4,jre1.5 --reportStartTime=\"`date +\"%m/%d/%Y %l:%M %P\"`\" --reportEndTime=\"`date +\"%m/%d/%Y %l:%M %P\"`\" ]"
29
    exit 1
34
    exit 1
30
fi
35
fi
31
36
37
# Setup the environment variables, modified from org.eclipse.hyades.releng.builder/master/bash/convert-parameters-into-variables.sf
38
for i in "$@"; do
39
	attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
40
	if [ -n "$attr" ]; then
41
		export "$attr"
42
	fi
43
done
44
45
# Verify the required variables, modified from org.eclipse.hyades.releng.builder/master/bash/verify-environment-variables.sf
46
for i in "$@"; do
47
	attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
48
	tmp=${runType:?"undefined run type"}
49
	tmp=${tptpRelease:?"undefined TPTP release"}
50
	tmp=${propertyFile:?"undefined property file"}
51
done
52
32
if [ $runType = "bvt" ]; then
53
if [ $runType = "bvt" ]; then
54
	for i in "$@"; do
55
		attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
56
		tmp=${tptpDriver:?"undefined TPTP target driver"}
57
		tmp=${jreList:?"undefined JRE list"}
58
	done
33
    echo "Setting up the dependencies"
59
    echo "Setting up the dependencies"
34
60
35
    ./dependencySetup.sh $tptpRelease $tptpDriver
61
    ./dependencySetup.sh $tptpRelease $tptpDriver
62
    ant -Dproperty_file=$propertyFile cleanupReports
36
63
37
    #Setup the remote host and local hosts
64
    #Setup the local host
38
    ant -Dproperty_file=$propertyFile setupBVT
65
    ant -Dproperty_file=$propertyFile setupBVT
39
    if [ $? -ne 0 ]; then
66
    if [ $? -ne 0 ]; then
40
        echo "Setup failed"
67
        echo "Setup failed"
41
        exit 1
68
        exit 1
42
    fi
69
    fi
43
    ant -Dproperty_file=$propertyFile runTests
44
    if [ $? -ne 0 ]; then
45
        echo "Test run failed"
46
        exit 1
47
    fi
48
70
49
    ant -Dproperty_file=$propertyFile copyBVTReport
71
    tptpAllInOne="tptp.runtime.allInOne.win32.win32.x86-$tptpDriver.zip"
72
    
73
    for jre in `echo $jreList |  sed s/,/\\\n/g`; do
74
        # Configure the local and remote machine and run the tests.
75
        ant -Dproperty_file=$propertyFile -DtargetJRE=$jre -DtptpDriver=$tptpAllInOne import
76
	    
77
	    #Setup the artifact, temporary solution for deployment
78
	    #For details see the README.txt in /org.eclipse.hyades.tests/resources/org.eclipse.hyades.tests.bvt.local.initializer_1.0.0.jar
79
	    echo "Setting up the artifacts"
80
	    cp ../workspace/org.eclipse.hyades.tests/resources/org.eclipse.hyades.tests.bvt.local.initializer_1.0.0.jar ../workbench/eclipse/dropins
81
	    ../workbench/eclipse/eclipse -clean -nosplash -application org.eclipse.hyades.tests.bvt.local.initializer.application -data ../workspace -vmargs -Dverbose=true
82
        
83
        ant -Dproperty_file=$propertyFile -DtargetJRE=$jre -DtptpDriver=$tptpAllInOne runTests
84
        if [ $? -ne 0 ]; then
85
            echo "Test run failed"
86
            exit 1
87
        fi
88
    done
89
        ssh tptp "if [ -e /home/data/httpd/download.eclipse.org/tptp/$tptpRelease/dev/$tptpDriver ]; then exit 1; fi"
90
        if [ $? -eq 1 ]; then
91
         	export common=tptp/$tptpRelease/dev/$tptpDriver; 
92
		else
93
			export common=tptp/$tptpRelease/$tptpDriver;
94
		fi
95
                   
96
  
97
    ant -Dproperty_file=$propertyFile -DdriverPath=$common copyBVTReport
50
    ant -Dproperty_file=$propertyFile cleanupRemote
98
    ant -Dproperty_file=$propertyFile cleanupRemote
51
    ant -Dproperty_file=$propertyFile cleanupLocal
99
    ant -Dproperty_file=$propertyFile cleanupLocal
100
    ant -Dproperty_file=$propertyFile cleanupDownloads
52
    rm dependencies.properties
101
    rm dependencies.properties
53
elif [ $runType = "report" ]; then
102
elif [ $runType = "report" ]; then
54
    # Driver not required, so reset the values
103
55
    export reportStartTime=$4
104
	# Verify the required variables, modified from org.eclipse.hyades.releng.builder/master/bash/verify-environment-variables.sf
56
    export reportEndTime=$5
105
	for i in "$@"; do
106
		attr=$( echo "$i" | grep '^--[^=]\+=.\+' | sed -e 's/^--\(.*\)/\1/')
107
		tmp=${reportStartTime:?"undefined report start time"}
108
		#tmp=${reportEndTime:?"undefined report end time"}
109
		if [ x"$reportEndTime" != x ]; then
110
			tmp=${reportEndTime:?"undefined report end time"}
111
		fi
112
		# tmp=${reportEndTime:?"undefined report end time"}
113
	done
114
    # Driver and jreList not required, so reset the values
57
    
115
    
58
    if [ x"$reportStartTime" = x ]; then
59
        echo "No start time set"
60
        exit 1
61
    fi
62
    ant -Dproperty_file=$propertyFile setupReport
116
    ant -Dproperty_file=$propertyFile setupReport
63
    if [ $? -ne 0 ]; then
117
    if [ $? -ne 0 ]; then
64
        echo "Setup failed"
118
        echo "Setup failed"
65
        ant -Dproperty_file=$propertyFile cleanupWorkspace
119
        ant -Dproperty_file=$propertyFile cleanupWorkspace
66
        exit 1
120
        exit 1
67
    fi
121
    fi
68
    ant -DstartTime="$reportStartTime" -Dproperty_file=$propertyFile publishReport
122
    if [ x"$reportEndTime" != x ]; then
123
        ant -DstartTime="$reportStartTime" -DendTime="$reportEndTime" -Dproperty_file=$propertyFile publishReport
124
    else
125
        ant -DstartTime="$reportStartTime" -Dproperty_file=$propertyFile publishReport
126
    fi
69
    if [ $? -ne 0 ]; then
127
    if [ $? -ne 0 ]; then
70
        echo "Reporting failed"
128
        echo "Reporting failed"
71
        ant -Dproperty_file=$propertyFile cleanupWorkspace
129
        ant -Dproperty_file=$propertyFile cleanupWorkspace
(-)org/eclipse/tptp/platform/releng/tools/testautomation/test.properties (-11 / +9 lines)
Lines 1-5 Link Here
1
############################################################################### 
1
############################################################################### 
2
# Copyright (c) 2008 IBM Corporation and others.
2
# Copyright (c) 2008, 2010 IBM Corporation and others.
3
# All rights reserved.   This program and the accompanying materials
3
# All rights reserved.   This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
Lines 15-26 Link Here
15
user=
15
user=
16
keyfile=
16
keyfile=
17
dir=
17
dir=
18
18
cygwinPath=
19
# Remote machine AC configuration
20
acUser=
21
acPassword=
22
cygwinACPath=
23
javaLocation=
24
19
25
# Report results storage location
20
# Report results storage location
26
reportLocation=${basedir}/reports
21
reportLocation=${basedir}/reports
Lines 30-37 Link Here
30
reportCheckinDirectory=
25
reportCheckinDirectory=
31
26
32
#BVT Report information for copying the results
27
#BVT Report information for copying the results
33
reportHostname=
28
reportHost=
34
reportUser=
29
30
#Copy the results to the remote web server, for example, /home/user/www/${driverPath}/BVT
31
remoteReportLocation=
35
32
36
# Workspace location e.g. /home/user/workspace
33
# Workspace location e.g. /home/user/workspace
37
tptp.test.workspace=
34
tptp.test.workspace=
Lines 45-53 Link Here
45
42
46
# Test driver and project, an exclude must be defined so all tests are not excluded
43
# Test driver and project, an exclude must be defined so all tests are not excluded
47
# or a non-existant test if only certain tests are to be excluded and the remainder included
44
# or a non-existant test if only certain tests are to be excluded and the remainder included
48
tptpDriver=${tptpWinDriver}
45
#tptpDriver=${tptpWinDriver}
46
acDriver=${acWinDriver}
49
testSuite=
47
testSuite=
50
excludeTestSuite=Smoke
48
excludeTestSuite=AllBVTxUnit
51
testProject=org.eclipse.hyades.tests
49
testProject=org.eclipse.hyades.tests
52
50
53
tempDir=${basedir}/temp
51
tempDir=${basedir}/temp

Return to bug 211751