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

Return to bug 211751