Megatest

Check-in [8c4b1ebbb6]
Login
Overview
Comment:Allow overriding num reruns from config, added to docs
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: 8c4b1ebbb69f16a89795d7a84834e994de53ee9b
User & Date: matt on 2015-08-27 23:47:02
Other Links: branch diff | manifest | tags
Context
2015-08-28
09:17
Fixed a rollup issue due to wrongly coded call in rmt.scm check-in: 1900a1979f user: mrwellan tags: v1.60
2015-08-27
23:58
Merged v1.60 into decoupled-tests check-in: fc19888e7f user: matt tags: v1.60-decoupled-tests
23:47
Merged v1.60 development into trunk check-in: 2f5d4ac654 user: matt tags: trunk
23:47
Allow overriding num reruns from config, added to docs check-in: 8c4b1ebbb6 user: matt tags: v1.60
23:08
Fixed ticket b05bb6c4 check-in: 44cb016122 user: matt tags: v1.60
Changes

Modified docs/manual/megatest_manual.html from [deb650ba7e] to [25fe0b3f9e].

1133
1134
1135
1136
1137
1138
1139










1140
1141
1142
1143
1144
1145
1146
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156







+
+
+
+
+
+
+
+
+
+







<h4 id="_launchers">launchers</h4>
<div class="listingblock">
<div class="title">test/itempath &#8658; host-type</div>
<div class="content monospaced">
<pre>runfirst/sum% remote</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_miscellaneous_setup_items">Miscellaneous Setup Items</h4>
<div class="paragraph"><p>Attempt to rerun tests in "STUCK/DEAD", "n/a", "ZERO_ITEMS" states.</p></div>
<div class="listingblock">
<div class="title">In megatest.config</div>
<div class="content monospaced">
<pre>[setup]
reruns 5</pre>
</div></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_the_testconfig_file">The testconfig File</h2>
<div class="sectionbody">
<div class="sect2">
1276
1277
1278
1279
1280
1281
1282






1283
1284
1285
1286
1287
1288
1289
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305







+
+
+
+
+
+







<h4 id="_skip_if_test_ran_more_recently_than_specified_time">Skip if test ran more recently than specified time</h4>
<div class="listingblock">
<div class="title">Skip if this test has been run in the past fifteen minutes and 15 seconds.</div>
<div class="content monospaced">
<pre>[skip]
rundelay 15m 15s</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_disks">Disks</h4>
<div class="paragraph"><p>A disks section in testconfig will override the disks section in
megatest.config. This can be used to allocate disks on a per-test or per item
basis.</p></div>
</div>
<div class="sect3">
<h4 id="_controlled_waiver_propagation">Controlled waiver propagation</h4>
<div class="paragraph"><p>If test is FAIL and previous test in run with same MT_TARGET is WAIVED then apply the following rules from the testconfig:
If a waiver check is specified in the testconfig apply the check and if it passes then set this FAIL to WAIVED</p></div>
<div class="paragraph"><p>Waiver check has two parts, 1) a list of waiver, rulename, filepatterns and 2) the rulename script spec (note that "diff" and "logpro" are predefined)</p></div>
<div class="listingblock">
1560
1561
1562
1563
1564
1565
1566
1567

1568
1569
1570
1571
1576
1577
1578
1579
1580
1581
1582

1583
1584
1585
1586
1587







-
+




</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
Version 1.0<br>
Last updated
 2015-07-12 21:50:37 MST
 2015-08-24 19:48:43 MST
</div>
</div>
</body>
</html>

Modified docs/manual/reference.txt from [4af9a389c4] to [2b7b55d46c].

44
45
46
47
48
49
50











51
52
53
54
55
56
57
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68







+
+
+
+
+
+
+
+
+
+
+








launchers
^^^^^^^^^
.test/itempath => host-type
------------
runfirst/sum% remote
------------

Miscellaneous Setup Items
^^^^^^^^^^^^^^^^^^^^^^^^^

Attempt to rerun tests in "STUCK/DEAD", "n/a", "ZERO_ITEMS" states.

.In megatest.config
------------------
[setup]
reruns 5
------------------

The testconfig File
-------------------

Setup section
~~~~~~~~~~~~~

Modified runs.scm from [b24323548a] to [17a0e725ee].

220
221
222
223
224
225
226
227



228





229
230
231
232
233
234
235
220
221
222
223
224
225
226

227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242







-
+
+
+

+
+
+
+
+







	 (test-records       (make-hash-table))
	 ;; need to process runconfigs before generating these lists
	 (all-tests-registry #f)  ;; (tests:get-all)) ;; (tests:get-valid-tests (make-hash-table) test-search-path)) ;; all valid tests to check waiton names
	 (all-test-names     #f)  ;; (hash-table-keys all-tests-registry))
	 (test-names         #f)  ;; (tests:filter-test-names all-test-names test-patts))
	 (required-tests     #f)  ;; Put fully qualified test/testpath names in this list to be done
	 (task-key           (conc (hash-table->alist flags) " " (get-host-name) " " (current-process-id)))
	 (tdbdat             (tasks:open-db)))
	 (tdbdat             (tasks:open-db))
	 (config-reruns      (let ((x (configf:lookup *configdat* "setup" "reruns")))
			       (if x (string->number x) #f))))

    ;; override the number of reruns from the configs
    (if (and config-reruns
	     (> run-count config-reruns))
	(set! run-count config-reruns))
    
    (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10))

    (let ((sighand (lambda (signum)
		     ;; (signal-mask! signum) ;; to mask or not? seems to cause issues in exiting
		     (if (eq? signum signal/stop)
			 (debug:print 0 "ERROR: attempt to STOP process. Exiting."))
		     (set! *time-to-exit* #t)
477
478
479
480
481
482
483
484

485
486
487
488
489
490
491
484
485
486
487
488
489
490

491
492
493
494
495
496
497
498







-
+







					  "runs: mark-incompletes")))
	    (thread-start! th1)
	    (thread-start! th2)
	    (thread-join! th1)
	    (set! keep-going #f)
	    (thread-join! th2)
	    ;; if run-count > 0 call, set -preclean and -rerun STUCK/DEAD
	    (if (> run-count 0)
	    (if (> run-count 0) ;; handle reruns
		(begin
		  (if (not (hash-table-ref/default flags "-preclean" #f))
		      (hash-table-set! flags "-preclean" #t))
		  (if (not (hash-table-ref/default flags "-rerun" #f))
		      (hash-table-set! flags "-rerun" "STUCK/DEAD,n/a,ZERO_ITEMS"))
		  ;; recursive call to self
		  (runs:run-tests target runname test-patts user flags run-count: (- run-count 1)))))