Merge lp:~zorba-coders/zorba/f-testPerfScript into lp:zorba
- f-testPerfScript
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Chris Hillery |
Approved revision: | 10507 |
Merged at revision: | 10534 |
Proposed branch: | lp:~zorba-coders/zorba/f-testPerfScript |
Merge into: | lp:zorba |
Diff against target: |
571 lines (+158/-100) 2 files modified
bin/CMakeLists.txt (+4/-0) test/zperf/src/start.xq (+154/-100) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/f-testPerfScript |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cezar Andrei | Approve | ||
Chris Hillery | Approve | ||
Review via email: mp+79628@code.launchpad.net |
This proposal supersedes a proposal from 2011-10-17.
Commit message
Add zperf query scripts to be compile-checked. Reproposal.
Description of the change
Add zperf query scripts to be compile-checked. Reproposal.
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal | # |
Chris Hillery (ceejatec) wrote : | # |
Looks like mostly re-formatting changes other than the addition of the test case; is that correct?
Out of curiosity, what was the motivation to add explicit fn:data() calls and proc: prefixes? The proc: prefixes seem like they're changing behaviour in some form, so I'd like to know why.
Cezar Andrei (cezar-andrei) wrote : | # |
Proc prefixes have been added to the module some time ago, but this script wasn't updated and fn:data to make the comparison explicit.
Chris Hillery (ceejatec) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job f-testPerfScrip
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job f-testPerfScrip
All tests succeeded!
Preview Diff
1 | === modified file 'bin/CMakeLists.txt' |
2 | --- bin/CMakeLists.txt 2011-08-05 02:21:55 +0000 |
3 | +++ bin/CMakeLists.txt 2011-10-17 22:15:28 +0000 |
4 | @@ -84,3 +84,7 @@ |
5 | # test the --option option to set an option in the static context |
6 | ZORBA_ADD_TEST(bin/zorba_option zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/test/option.xq" -f --option "{http://www.zorba-xquery.com}option=value") |
7 | ZORBA_SET_TEST_PROPERTY(bin/zorba_option PASS_REGULAR_EXPRESSION "value") |
8 | + |
9 | +# test compilation of the perf script |
10 | +ZORBA_ADD_TEST(bin/zorba_compilechk4 zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/../test/zperf/src/start.xq" -f --compile-only) |
11 | + |
12 | |
13 | === modified file 'test/zperf/src/start.xq' |
14 | --- test/zperf/src/start.xq 2011-08-05 02:21:55 +0000 |
15 | +++ test/zperf/src/start.xq 2011-10-17 22:15:28 +0000 |
16 | @@ -27,17 +27,20 @@ |
17 | declare namespace err = "http://www.w3.org/2005/xqt-errors"; |
18 | |
19 | |
20 | -declare %ann:sequential function local:getPlatform() |
21 | +declare %ann:sequential |
22 | +function local:getPlatform() |
23 | { |
24 | <pdash:platform site-osname="Ubuntu" os-version="11.04" os-platform="Linux" |
25 | - hostname="28msec.dyndns.org" is-64bits="true" vendor-id="Cezar" vendor-label="i7" |
26 | - number-of-logical-cpu="{xs:int(12)}" number-of-physical-cpu="1" |
27 | - total-virtual-memory="6117504000" total-physical-memory="0" |
28 | - number-of-logical-cpu-per-physical-cpu="12"/> |
29 | + hostname="28msec.dyndns.org" is-64bits="true" vendor-id="Cezar" |
30 | + vendor-label="santacruz" |
31 | + number-of-logical-cpu="{xs:int(8)}" number-of-physical-cpu="1" |
32 | + total-virtual-memory="12389692000" total-physical-memory="0" |
33 | + number-of-logical-cpu-per-physical-cpu="8"/> |
34 | }; |
35 | |
36 | |
37 | -declare %ann:sequential %ann:nondeterministic function local:makeDir($svnDir as xs:string) |
38 | +declare %ann:sequential %ann:nondeterministic |
39 | +function local:makeDir($svnDir as xs:string) |
40 | { |
41 | if( fn:not( file:exists($svnDir) ) ) |
42 | then |
43 | @@ -50,57 +53,64 @@ |
44 | then |
45 | { |
46 | fn:trace("", fn:concat("Error: ", $svnDir, " is not a dir.")); |
47 | - fn:error(xs:QName("local:ZPERF0001"), fn:concat("Error: ", $svnDir, " is not a dir.")); |
48 | + fn:error(xs:QName("local:ZPERF0001"), fn:concat("Error: ", $svnDir, |
49 | + " is not a dir.")); |
50 | } |
51 | else fn:trace("", fn:concat("--- Found ", $svnDir, " directory.")); |
52 | }; |
53 | |
54 | |
55 | -declare %ann:sequential function local:svnCo($svnCmd as xs:string, |
56 | - $svnDir as xs:string, $svnRev as xs:integer) |
57 | +declare %ann:sequential |
58 | +function local:svnCo($svnCmd as xs:string, |
59 | + $svnDir as xs:string, $svnRev as xs:string) |
60 | { |
61 | variable $svnCo := fn:concat($svnCmd, " co -r ", $svnRev, |
62 | " http://zorba.svn.sourceforge.net/svnroot/zorba/trunk/zorba ", $svnDir); |
63 | fn:trace($svnCo, "cmd"); |
64 | |
65 | variable $svnCoResult := proc:exec($svnCmd, |
66 | - ("co", "-r", xs:string($svnRev), |
67 | + ("co", "-r", $svnRev, |
68 | "http://zorba.svn.sourceforge.net/svnroot/zorba/trunk/zorba", $svnDir)); |
69 | |
70 | - if( $svnCoResult/exit-code eq "0") |
71 | + if( fn:data($svnCoResult/proc:exit-code) eq "0") |
72 | then |
73 | - fn:trace( fn:data($svnCoResult/stdout), "--- svn co: "); |
74 | + fn:trace( fn:data($svnCoResult/proc:stdout), "--- svn co: "); |
75 | else |
76 | { |
77 | - fn:trace( fn:data($svnCoResult/stderr), "ERROR: "); |
78 | - fn:error(xs:QName("local:ZPERF0003"), fn:concat("Error svn co: ", fn:data($svnCoResult/stderr))); |
79 | + fn:trace( fn:data($svnCoResult/proc:stderr), "ERROR: "); |
80 | + fn:error(xs:QName("local:ZPERF0003"), fn:concat("Error svn co: ", |
81 | + fn:data($svnCoResult/proc:stderr))); |
82 | } |
83 | |
84 | - fn:data($svnCoResult/exit-code) |
85 | + fn:data($svnCoResult/proc:exit-code) |
86 | }; |
87 | |
88 | |
89 | -declare %ann:sequential %ann:nondeterministic function local:makeSvnDir($svnCmd as xs:string, |
90 | - $svnDir as xs:string, $svnRev as xs:integer) |
91 | +declare %ann:sequential %ann:nondeterministic |
92 | +function local:makeSvnDir($svnCmd as xs:string, |
93 | + $svnDir as xs:string, $svnRev as xs:string) |
94 | { |
95 | if ( file:exists(fn:concat($svnDir, file:directory-separator(), "AUTHORS.txt")) and |
96 | file:exists(fn:concat($svnDir, file:directory-separator(), "src")) ) |
97 | then |
98 | - fn:trace("", fn:concat("--- Assuming ", $svnDir, " is the Zorba svn checkout dir.")); |
99 | + fn:trace("", fn:concat("--- Assuming ", $svnDir, |
100 | + " is the Zorba svn checkout dir.")); |
101 | else |
102 | if ( fn:empty(file:list($svnDir)) ) |
103 | then |
104 | local:svnCo($svnCmd, $svnDir, $svnRev); |
105 | else |
106 | { |
107 | - variable $msg := fn:concat("Error: ", $svnDir, " is not empty and it doesn't contain Zorba."); |
108 | + variable $msg := fn:concat("Error: ", $svnDir, |
109 | + " is not empty and it doesn't contain Zorba."); |
110 | fn:error(xs:QName("local:ZPERF0002"), $msg); |
111 | } |
112 | }; |
113 | |
114 | |
115 | -declare %ann:sequential function local:update($svnCmd as xs:string, |
116 | - $svnDir as xs:string, $svnRev as xs:integer) |
117 | +declare %ann:sequential |
118 | +function local:update($svnCmd as xs:string, |
119 | + $svnDir as xs:string, $svnRev as xs:string) |
120 | { |
121 | fn:trace("", fn:concat("--- Svn update @rev", $svnRev)); |
122 | |
123 | @@ -110,14 +120,15 @@ |
124 | variable $svnUpResult := proc:exec($svnCmd, |
125 | ("up", "-r", xs:string($svnRev), "--accept", "theirs-full", $svnDir)); |
126 | |
127 | - if( $svnUpResult/exit-code eq "0") |
128 | + if( fn:data($svnUpResult/proc:exit-code) eq "0") |
129 | then |
130 | - fn:trace( fn:data($svnUpResult/stdout), "svn up: "); |
131 | + fn:trace( fn:data($svnUpResult/proc:stdout), "svn up: "); |
132 | else |
133 | { |
134 | - fn:trace( fn:data($svnUpResult/stderr), "ERROR: "); |
135 | + fn:trace( fn:data($svnUpResult/proc:stderr), "ERROR: "); |
136 | fn:trace( $svnUpResult, "svn up: "); |
137 | - fn:error(xs:QName("local:ZPERF0004"), fn:concat("Error svn up: ", fn:data($svnUpResult/stderr))); |
138 | + fn:error(xs:QName("local:ZPERF0004"), fn:concat("Error svn up: ", |
139 | + fn:data($svnUpResult/proc:stderr))); |
140 | } |
141 | |
142 | |
143 | @@ -126,27 +137,29 @@ |
144 | variable $svnInfoResult := proc:exec($svnCmd, |
145 | ("info", "--xml", $svnDir)); |
146 | |
147 | - if( $svnInfoResult/exit-code eq "0") |
148 | + if( fn:data($svnInfoResult/proc:exit-code) eq "0") |
149 | then |
150 | { |
151 | - fn:trace( fn:data($svnInfoResult/stdout), "svn info: "); |
152 | + fn:trace( fn:data($svnInfoResult/proc:stdout), "svn info: "); |
153 | |
154 | (: need to find the revision date :) |
155 | - variable $strOut := fn:data($svnInfoResult/stdout); |
156 | + variable $strOut := fn:data($svnInfoResult/proc:stdout); |
157 | variable $doc := fn:parse-xml($strOut); |
158 | |
159 | xs:dateTime(fn:data($doc/info/entry/commit/date)) |
160 | } |
161 | else |
162 | { |
163 | - fn:trace( fn:data($svnInfoResult/stderr), "ERROR: "); |
164 | + fn:trace( fn:data($svnInfoResult/proc:stderr), "ERROR: "); |
165 | fn:trace( $svnInfoResult, "svn info: "); |
166 | - fn:error(xs:QName("local:ZPERF0004"), fn:concat("Error svn info: ", fn:data($svnInfoResult/stderr))); |
167 | + fn:error(xs:QName("local:ZPERF0004"), fn:concat("Error svn info: ", |
168 | + fn:data($svnInfoResult/proc:stderr))); |
169 | } |
170 | }; |
171 | |
172 | |
173 | -declare %ann:sequential %ann:nondeterministic function local:build( $buildDir as xs:string, |
174 | +declare %ann:sequential %ann:nondeterministic |
175 | +function local:build( $buildDir as xs:string, |
176 | $clean as xs:boolean, $cmakeCmd as xs:string, |
177 | $makeCmd as xs:string, $makeThreads as xs:int) |
178 | { |
179 | @@ -156,13 +169,14 @@ |
180 | then |
181 | { |
182 | variable $res := proc:exec("rm", ("-fR", $buildDir)); |
183 | - if( $res/exit-code eq "0" ) |
184 | + if( fn:data($res/proc:exit-code) eq "0" ) |
185 | then |
186 | fn:trace("", fn:concat(" - rm -fR ", $buildDir) ); |
187 | else |
188 | { |
189 | fn:trace($res, fn:concat("ERROR: rm -fR ", $buildDir)); |
190 | - fn:error(xs:QName("local:ZPERF0005"), fn:concat("Error rm -fR: ", fn:data($res/stderr))); |
191 | + fn:error(xs:QName("local:ZPERF0005"), fn:concat("Error rm -fR: ", |
192 | + fn:data($res/proc:stderr))); |
193 | } |
194 | |
195 | } |
196 | @@ -172,13 +186,14 @@ |
197 | then |
198 | { |
199 | variable $res := proc:exec("mkdir", ($buildDir)); |
200 | - if( $res/exit-code eq "0" ) |
201 | + if( fn:data($res/proc:exit-code) eq "0" ) |
202 | then |
203 | - fn:trace(fn:data($res/stdout), fn:concat(" - mkdir ", $buildDir) ); |
204 | + fn:trace(fn:data($res/proc:stdout), fn:concat(" - mkdir ", $buildDir) ); |
205 | else |
206 | { |
207 | fn:trace($res, fn:concat("ERROR: mkdir", $buildDir)); |
208 | - fn:error(xs:QName("local:ZPERF0006"), fn:concat("Error mkdir: ", fn:data($res/stderr))); |
209 | + fn:error(xs:QName("local:ZPERF0006"), fn:concat("Error mkdir: ", |
210 | + fn:data($res/proc:stderr))); |
211 | } |
212 | } |
213 | else {} |
214 | @@ -188,44 +203,54 @@ |
215 | { |
216 | fn:trace("---", "--- Starting cmake ... "); |
217 | variable $res := proc:exec("cd", ($buildDir, "&&", $cmakeCmd, "..")); |
218 | - if( $res/exit-code eq "0" ) |
219 | + |
220 | + if( fn:data($res/proc:exit-code) eq "0" ) |
221 | then |
222 | - fn:trace(fn:data($res/stdout), fn:concat(" - cd ", $buildDir, " && cmake ..") ); |
223 | + fn:trace(fn:data($res/proc:stdout), fn:concat(" - cd ", $buildDir, |
224 | + " && cmake ..") ); |
225 | else |
226 | { |
227 | fn:trace($res, fn:concat("ERROR: cd ", $buildDir, " && cmake ..")); |
228 | - fn:error(xs:QName("local:ZPERF0007"), fn:concat("Error cd ", $buildDir, " && cmake ..: ", fn:data($res/stderr))); |
229 | + fn:error(xs:QName("local:ZPERF0007"), |
230 | + fn:concat("Error cd ", $buildDir, |
231 | + " && cmake ..: ", fn:data($res/proc:stderr))); |
232 | } |
233 | } |
234 | else {} |
235 | |
236 | fn:trace("---", "--- Starting make ... "); |
237 | - variable $res := proc:exec("cd", ($buildDir, "&&", $makeCmd, "-j", fn:string($makeThreads))); |
238 | - if( $res/exit-code eq "0" ) |
239 | + variable $res := proc:exec("cd", ($buildDir, "&&", $makeCmd, "-j", |
240 | + fn:string($makeThreads))); |
241 | + |
242 | + if( fn:data($res/proc:exit-code) eq "0" ) |
243 | then |
244 | - fn:trace(fn:data($res/stdout), fn:concat(" - cd ", $buildDir, " && make") ); |
245 | + fn:trace(fn:data($res/proc:stdout), fn:concat(" - cd ", $buildDir, |
246 | + " && make") ); |
247 | else |
248 | { |
249 | fn:trace($res, fn:concat("ERROR: cd ", $buildDir, " && make")); |
250 | - fn:error(xs:QName("local:ZPERF0008"), fn:concat("Error cd ", $buildDir, " && make : ", fn:data($res/stderr))); |
251 | + fn:error(xs:QName("local:ZPERF0008"), fn:concat("Error cd ", $buildDir, |
252 | + " && make : ", fn:data($res/proc:stderr))); |
253 | } |
254 | |
255 | |
256 | fn:trace("---", " - ls"); |
257 | $res := proc:exec("ls", ($buildDir)); |
258 | - if( $res/exit-code eq "0" ) |
259 | + if( fn:data($res/proc:exit-code) eq "0" ) |
260 | then |
261 | - fn:trace(fn:data($res/stdout), fn:concat("ls ", $buildDir) ); |
262 | + fn:trace(fn:data($res/proc:stdout), fn:concat("ls ", $buildDir) ); |
263 | else |
264 | { |
265 | fn:trace($res, fn:concat("ERROR: ls ", $buildDir)); |
266 | - fn:error(xs:QName("local:ZPERF0009"), fn:concat("Error ls: ", fn:data($res/stderr))); |
267 | + fn:error(xs:QName("local:ZPERF0009"), fn:concat("Error ls: ", |
268 | + fn:data($res/proc:stderr))); |
269 | } |
270 | }; |
271 | |
272 | |
273 | -declare %ann:sequential function local:runXMarkTestSuits($zorbaCmd as xs:string, $xmarkDir as xs:string, |
274 | - $initialNoOfRuns as xs:int, $revision as xs:integer, $revDate as xs:dateTime) |
275 | +declare %ann:sequential |
276 | +function local:runXMarkTestSuits($zorbaCmd as xs:string, $xmarkDir as xs:string, |
277 | + $initialNoOfRuns as xs:int, $revision as xs:string, $revDate as xs:dateTime) |
278 | { |
279 | fn:trace("---", "--- Running xmark tests ... "); |
280 | |
281 | @@ -238,7 +263,8 @@ |
282 | variable $noOfRuns := $inputTimes[$pos]; |
283 | |
284 | <rez rev="{$revision}" revDate="{$revDate}"> |
285 | - <pdash:suite id="{fn:concat("xmark-", $inputCtx, "-", xs:string($noOfRuns), "x")}"> |
286 | + <pdash:suite id="{fn:concat("xmark-", $inputCtx, "-", |
287 | + xs:string($noOfRuns), "x")}"> |
288 | { |
289 | local:runXMarkTests($zorbaCmd, $xmarkDir, $noOfRuns, $inputCtx) |
290 | } |
291 | @@ -248,26 +274,29 @@ |
292 | }; |
293 | |
294 | |
295 | -declare %ann:sequential function local:runXMarkTests($zorbaCmd as xs:string, $xmarkDir as xs:string, |
296 | +declare %ann:sequential |
297 | +function local:runXMarkTests($zorbaCmd as xs:string, $xmarkDir as xs:string, |
298 | $noOfRuns as xs:integer, $inputCtx as xs:string) |
299 | { |
300 | fn:trace("---", fn:concat(" -- xmark tests ", $noOfRuns, " ", $inputCtx)); |
301 | |
302 | - for $i in 1 to 20 |
303 | + for $i in 1 to 20 (: for all q1.xq to q20.xq tests :) |
304 | return |
305 | { |
306 | variable $testName := fn:concat("q", $i); |
307 | - variable $testFile := fn:concat($xmarkDir, file:directory-separator(), "q", $i, ".xq"); |
308 | + variable $testFile := fn:concat($xmarkDir, file:directory-separator(), |
309 | + "q", $i, ".xq"); |
310 | fn:trace($testFile, "test file"); |
311 | - |
312 | - variable $res := proc:exec($zorbaCmd, ("-m", xs:string($noOfRuns), "-e", $inputCtx, |
313 | - "-t", "-f", "-q", $testFile)); |
314 | - |
315 | - if( $res/exit-code eq "0" ) |
316 | + fn:trace( fn:concat($zorbaCmd, "-m", xs:string($noOfRuns), "-e", $inputCtx, |
317 | + "-t", "-f", "-q", $testFile), " - cmd: "); |
318 | + variable $res := proc:exec($zorbaCmd, ("-m", xs:string($noOfRuns), "-e", |
319 | + $inputCtx, "-t", "-f", "-q", $testFile)); |
320 | + |
321 | + if( fn:data($res/proc:exit-code) eq "0" ) |
322 | then |
323 | { |
324 | - (: fn:trace(fn:data($res/stdout), fn:concat("zorba ", $testFile)); :) |
325 | - variable $times := tims:substring-after-last( fn:data($res/stdout), |
326 | + (: fn:trace(fn:data($res/proc:stdout), fn:concat("zorba ", $testFile)); :) |
327 | + variable $times := tims:substring-after-last( fn:data($res/proc:stdout), |
328 | 'Number of executions'); |
329 | fn:trace( $times, fn:concat("zorba ", $testFile)); |
330 | |
331 | @@ -276,18 +305,24 @@ |
332 | { |
333 | $t := tims:parseTimings($times); |
334 | } |
335 | - catch * |
336 | + catch * |
337 | { |
338 | - fn:trace("", fn:concat(" - Test ", $testName, " failed, skip submiting it: ", $err:code, " ", $err:description )); |
339 | + fn:trace("", fn:concat(" - Test ", $testName, |
340 | + " failed, skip submiting it: ", $err:code, " ", |
341 | + $err:description )); |
342 | |
343 | exit returning |
344 | <pdash:test id="{$testName}" iterations="{$noOfRuns}"> |
345 | - <pdash:measurements><pdash:error>1</pdash:error></pdash:measurements> |
346 | + <pdash:measurements><pdash:error>1</pdash:error> |
347 | + </pdash:measurements> |
348 | <error> |
349 | { |
350 | - fn:concat(" - Test ", $testName, " failed: erorcode=", $err:code, |
351 | - " desc=", $err:description, " exit-code=", fn:data($res/exit-code), |
352 | - " stdout=", fn:data($res/stdout), " stderr=", fn:data($res/stderr) ) |
353 | + fn:concat(" - Test ", $testName, " failed: erorcode=", |
354 | + $err:code, |
355 | + " desc=", $err:description, " exit-code=", |
356 | + fn:data($res/proc:exit-code), |
357 | + " stdout=", fn:data($res/proc:stdout), " stderr=", |
358 | + fn:data($res/proc:stderr) ) |
359 | } |
360 | </error> |
361 | </pdash:test> |
362 | @@ -306,7 +341,8 @@ |
363 | else |
364 | { |
365 | fn:trace($res, fn:concat("ERROR: zorba ", $testFile)); |
366 | - fn:error(xs:QName("local:ZPERF0010"), fn:concat("Error zorba ", $testFile, " : ", fn:data($res/stderr))); |
367 | + fn:error(xs:QName("local:ZPERF0010"), fn:concat("Error zorba ", |
368 | + $testFile, " : ", fn:data($res/proc:stderr))); |
369 | |
370 | exit returning |
371 | <pdash:test id="{$testName}" iterations="{$noOfRuns}"> |
372 | @@ -314,8 +350,9 @@ |
373 | <error> |
374 | { |
375 | fn:concat(" - Test ", $testName, " failed: ", |
376 | - " exit-code=", fn:data($res/exit-code), " stdout=", fn:data($res/stdout), |
377 | - " stderr=", fn:data($res/stderr) ) |
378 | + " exit-code=", fn:data($res/proc:exit-code), " stdout=", |
379 | + fn:data($res/proc:stdout), |
380 | + " stderr=", fn:data($res/proc:stderr) ) |
381 | } |
382 | </error> |
383 | </pdash:test> |
384 | @@ -325,14 +362,16 @@ |
385 | }; |
386 | |
387 | |
388 | -declare %ann:sequential function local:publishResults($allResults, $platform, $buildName as xs:string) |
389 | +declare %ann:sequential |
390 | +function local:publishResults($allResults, $platform, $buildName as xs:string) |
391 | { |
392 | fn:trace(fn:count($allResults), "--- Publish results ..."); |
393 | |
394 | for $rez in $allResults |
395 | return |
396 | { |
397 | - variable $msg := local:makeMessage($rez/pdash:suite, $platform, fn:data($rez/@rev), |
398 | + variable $msg := local:makeMessage($rez/pdash:suite, $platform, |
399 | + fn:data($rez/@rev), |
400 | fn:data($rez/@revDate), $buildName); |
401 | |
402 | local:submitMessage($msg); |
403 | @@ -340,7 +379,8 @@ |
404 | }; |
405 | |
406 | |
407 | -declare %ann:sequential function local:makeMessage($suite, $platform, $revision as xs:string, |
408 | +declare %ann:sequential |
409 | +function local:makeMessage($suite, $platform, $revision as xs:string, |
410 | $revDate as xs:string, $buildName as xs:string) |
411 | { |
412 | fn:trace("", " - makeMessage"); |
413 | @@ -356,7 +396,9 @@ |
414 | </pdash:submission> |
415 | }; |
416 | |
417 | -declare %ann:sequential function local:submitMessage($msg) |
418 | + |
419 | +declare %ann:sequential |
420 | +function local:submitMessage($msg) |
421 | { |
422 | fn:trace(fn:serialize($msg), " - submitMessage"); |
423 | |
424 | @@ -373,9 +415,9 @@ |
425 | }; |
426 | |
427 | |
428 | -declare %ann:sequential function local:runXRayTestSuits($zorbaCmd as xs:string, |
429 | - $xrayDir as xs:string, $initialNoOfRuns as xs:int, $revision as xs:integer, |
430 | - $revDate as xs:dateTime) |
431 | +declare %ann:sequential |
432 | +function local:runXRayTestSuits($zorbaCmd as xs:string, $xrayDir as xs:string, |
433 | + $initialNoOfRuns as xs:int, $revision as xs:string, $revDate as xs:dateTime) |
434 | { |
435 | fn:trace("---", "--- Running xray tests ... "); |
436 | |
437 | @@ -386,7 +428,7 @@ |
438 | if ( fn:exists($resXRay) ) |
439 | then |
440 | <rez rev="{$revision}" revDate="{$revDate}"> |
441 | - <pdash:suite id="{fn:concat("xray-320x240-", xs:string($noOfRuns), "x")}"> |
442 | + <pdash:suite id="{fn:concat('xray-320x240-', xs:string($noOfRuns), 'x')}"> |
443 | { |
444 | $resXRay |
445 | } |
446 | @@ -397,7 +439,8 @@ |
447 | }; |
448 | |
449 | |
450 | -declare %ann:sequential function local:runXRayTests($zorbaCmd as xs:string, |
451 | +declare %ann:sequential function |
452 | +local:runXRayTests($zorbaCmd as xs:string, |
453 | $xrayDir as xs:string, $noOfRuns as xs:integer) |
454 | { |
455 | fn:trace("---", fn:concat(" -- xray test ", $noOfRuns, "x")); |
456 | @@ -407,11 +450,11 @@ |
457 | |
458 | variable $res := proc:exec($zorbaCmd, ("-m", xs:string($noOfRuns), |
459 | "-t", "-f", "-q", $testFile)); |
460 | - |
461 | - variable $times := tims:substring-after-last( fn:data($res/stdout), |
462 | + fn:trace(fn:data($res/proc:exit-code), " - xray execution exit-code - "); |
463 | + variable $times := tims:substring-after-last( fn:data($res/proc:stdout), |
464 | 'Number of executions'); |
465 | - |
466 | - if( $res/exit-code eq "0" ) |
467 | + |
468 | + if( fn:data($res/proc:exit-code) eq "0" ) |
469 | then |
470 | { |
471 | fn:trace($times, fn:concat("zorba ", $testFile)); |
472 | @@ -423,15 +466,19 @@ |
473 | } |
474 | catch * |
475 | { |
476 | - fn:trace("", fn:concat(" - Test xray failed, skip submiting it: ", $err:code, " ", $err:description )); |
477 | + fn:trace("", fn:concat(" - Test xray failed, skip submiting it: ", |
478 | + $err:code, " ", $err:description )); |
479 | |
480 | exit returning |
481 | <pdash:test id="xray" iterations="{$noOfRuns}"> |
482 | <pdash:measurements><pdash:error>1</pdash:error></pdash:measurements> |
483 | <error> |
484 | { |
485 | - fn:concat(" - Test xray failed, skip submiting it: erorcode=", $err:code, " desc=", $err:description, |
486 | - " exit-code=", fn:data($res/exit-code), " stdout=", fn:data($res/stdout), " stderr=", fn:data($res/stderr) ) |
487 | + fn:concat(" - Test xray failed, skip submiting it: erorcode=", |
488 | + $err:code, " desc=", $err:description, |
489 | + " exit-code=", fn:data($res/proc:exit-code), " stdout=", |
490 | + fn:data($res/proc:stdout), " stderr=", |
491 | + fn:data($res/proc:stderr) ) |
492 | } |
493 | </error> |
494 | </pdash:test> |
495 | @@ -449,7 +496,8 @@ |
496 | else |
497 | { |
498 | fn:trace($res, fn:concat("ERROR: zorba ", $testFile)); |
499 | - fn:error(xs:QName("local:ZPERF0010"), fn:concat("Error zorba ", $testFile, " : ", fn:data($res/stderr))); |
500 | + fn:error(xs:QName("local:ZPERF0010"), fn:concat("Error zorba ", |
501 | + $testFile, " : ", fn:data($res/proc:stderr))); |
502 | |
503 | exit returning |
504 | <pdash:test id="xray" iterations="{$noOfRuns}"> |
505 | @@ -457,7 +505,8 @@ |
506 | <error> |
507 | { |
508 | fn:concat("Error zorba ", $testFile, " : ", |
509 | - " exit-code=", fn:data($res/exit-code), " stdout=", fn:data($res/stdout), " stderr=", fn:data($res/stderr) ) |
510 | + " exit-code=", fn:data($res/proc:exit-code), " stdout=", |
511 | + fn:data($res/proc:stdout), " stderr=", fn:data($res/proc:stderr) ) |
512 | } |
513 | </error> |
514 | </pdash:test> |
515 | @@ -480,37 +529,42 @@ |
516 | let $xrayDir := "xray" |
517 | let $svnCmd := "/usr/bin/svn" |
518 | let $cmakeCmd := "/usr/bin/cmake" |
519 | -let $zorbaCmd := fn:concat($buildDir, file:directory-separator(),"bin", file:directory-separator(),"zorba") |
520 | +let $zorbaCmd := fn:concat($buildDir, file:directory-separator(), |
521 | + "bin", file:directory-separator(), "zorba") |
522 | let $makeCmd := xs:string("/usr/bin/make") |
523 | -(: let $svnRevs := (8625, 8709, 8852, 9023, 9252, 9496, 9745, 9938, 10069, 10237, |
524 | - 10431, 10742, 10766) |
525 | -:) |
526 | -(: let $svnRevs := (8625, 8709, 8852, 9023, 9252, 9496, 9938, 10069, 10237, |
527 | - 10916 ) |
528 | -let $svnRevs := ( 9500, 9600, 9650, 9700, 9750, 9800, 9850, 9900, |
529 | - 10100, 10133, 10166, 10200) :) |
530 | -let $svnRevs := (11238) |
531 | +let $svnRevs := ("HEAD") |
532 | |
533 | -let $buildName := "ztest2" |
534 | +let $buildName := "santacruz" |
535 | let $initialNoOfRuns := xs:int(100) |
536 | let $platform := local:getPlatform() |
537 | return |
538 | { |
539 | fn:trace(fn:current-dateTime(), "----- Starting time"); |
540 | |
541 | + (: |
542 | local:makeDir($svnDir); |
543 | local:makeSvnDir($svnCmd, $svnDir, $svnRevs[1]); |
544 | + :) |
545 | |
546 | for $i in ($svnRevs) |
547 | return |
548 | { |
549 | - variable $revDate as xs:dateTime := local:update($svnCmd, $svnDir, $i); |
550 | - local:build($buildDir, fn:false(), $cmakeCmd, $makeCmd, $platform/@number-of-logical-cpu); |
551 | + variable $revDate as xs:dateTime := fn:current-dateTime(); |
552 | + |
553 | + (: |
554 | + local:update($svnCmd, $svnDir, $i); |
555 | + :) |
556 | + local:build($buildDir, fn:false(), $cmakeCmd, $makeCmd, |
557 | + $platform/@number-of-logical-cpu); |
558 | + |
559 | |
560 | - variable $resXRay := local:runXRayTestSuits($zorbaCmd, $xrayDir, xs:int(3), $i, $revDate); |
561 | + variable $resXRay := local:runXRayTestSuits($zorbaCmd, $xrayDir, |
562 | + xs:int(3), $i, $revDate); |
563 | local:publishResults($resXRay, $platform, $buildName); |
564 | |
565 | - variable $resXMark := local:runXMarkTestSuits($zorbaCmd, $xmarkDir, $initialNoOfRuns, $i, $revDate); |
566 | + |
567 | + variable $resXMark := local:runXMarkTestSuits($zorbaCmd, $xmarkDir, |
568 | + $initialNoOfRuns, $i, $revDate); |
569 | local:publishResults($resXMark, $platform, $buildName); |
570 | |
571 | } |
Why does your commit remove so much useful stuff that was made before (e.g. from the ChangeLog and DownloadModules script)?