Modified Makefile
from [7660beeb07]
to [00d538b903].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-
+
|
# make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)'
PREFIX=$(PWD)
CSCOPTS=
INSTALL=install
SRCFILES = common.scm items.scm launch.scm \
ods.scm runconfig.scm server.scm configf.scm \
db.scm keys.scm margs.scm megatest-version.scm \
process.scm runs.scm tasks.scm tests.scm genexample.scm \
fs-transport.scm http-transport.scm \
client.scm gutils.scm synchash.scm daemon.scm mt.scm dcommon.scm \
tree.scm
tree.scm ezsteps.scm
GUISRCF = dashboard-tests.scm dashboard-guimonitor.scm
OFILES = $(SRCFILES:%.scm=%.o)
GOFILES = $(GUISRCF:%.scm=%.o)
ADTLSCR=mt_laststep mt_runstep mt_ezstep
|
︙ | | |
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
+
+
+
+
|
$(HELPERS) : utils/mt_*
$(INSTALL) $< $@
chmod a+x $@
$(DEPLOYHELPERS) : utils/mt_*
$(INSTALL) $< $@
chmod a+X $@
$(PREFIX)/bin/mt_xterm : utils/mt_xterm
$(INSTALL) $< $@
chmod a+x $@
$(PREFIX)/bin/nbfake : utils/nbfake
$(INSTALL) $< $@
chmod a+x $@
$(PREFIX)/bin/nbfind : utils/nbfind
$(INSTALL) $< $@
|
︙ | | |
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
-
+
+
|
# install dashboard as dboard so wrapper script can be called dashboard
$(PREFIX)/bin/dboard : dboard $(FILES)
$(INSTALL) dboard $(PREFIX)/bin/dboard
utils/mk_wrapper $(PREFIX) dboard > $(PREFIX)/bin/dashboard
chmod a+x $(PREFIX)/bin/dashboard
install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb
install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake \
$(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb $(PREFIX)/bin/mt_xterm
deploytarg/apropos.so : Makefile
for i in apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile opensll openssl lookup-table list-utils stack; do \
chicken-install -prefix deploytarg -deploy $$i;done
deploytarg/libsqlite3.so :
CSC_OPTIONS="-Ideploytarg -Ldeploytarg" $CHICKEN_INSTALL -prefix deploytarg -deploy sqlite3
|
︙ | | |
Modified client.scm
from [402eaa1014]
to [e09e6cd211].
︙ | | |
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
-
+
-
+
-
-
+
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
|
ok))
;; Do all the connection work, look up the transport type and set up the
;; connection if required.
;;
;; There are two scenarios.
;; 1. We are a test manager and we received *transport-type* and *runremote* via cmdline
;; 2. We are a run tests, list runs or other interactive process and we mush figure out
;; 2. We are a run tests, list runs or other interactive process and we must figure out
;; *transport-type* and *runremote* from the monitor.db
;;
;; client:setup
(define (client:setup #!key (numtries 50))
(define (client:setup #!key (numtries 3))
(if (not *toppath*)
(if (not (setup-for-run))
(begin
(debug:print 0 "ERROR: failed to find megatest.config, exiting")
(exit))))
(push-directory *toppath*) ;; This is probably NOT needed
(debug:print-info 11 "*transport-type* is " *transport-type* ", *runremote* is " *runremote*)
(let* ((hostinfo (if (not *transport-type*) ;; If we dont' already have transport type set then figure it out
(open-run-close tasks:get-best-server tasks:open-db)
(let* ((hostinfo (open-run-close tasks:get-best-server tasks:open-db)))
#f)))
;; if have hostinfo then extract the transport type
;; else fall back to fs
(debug:print-info 11 "CLIENT SETUP, hostinfo=" hostinfo)
(set! *transport-type* (if hostinfo
(string->symbol (tasks:hostinfo-get-transport hostinfo))
'fs))
;; ;; DEBUG STUFF
;; (if (eq? *transport-type* 'fs)(begin (print "ERROR!!!!!!! refusing to run with transport " *transport-type*)(exit 99)))
(debug:print-info 11 "Using transport type of " *transport-type* (if hostinfo (conc " to connect to " hostinfo) ""))
(case *transport-type*
((fs) ;; (if (not *megatest-db*)(set! *megatest-db* (open-db))))
((fs)(if (not *megatest-db*)(set! *megatest-db* (open-db))))
;; we are not doing fs any longer. let's cheat and start up a server
;; if we are falling back on fs (not 100% supported) do an about face and start a server
(if (not (equal? (args:get-arg "-transport") "fs"))
(begin
(set! *transport-type* #f)
(system (conc "megatest -list-servers | grep " megatest-version " | grep alive || megatest -server - -daemonize && sleep 3"))
(thread-sleep! 1)
(if (> numtries 0)
(client:setup numtries: (- numtries 1))))))
((http)
(http-transport:client-connect (tasks:hostinfo-get-interface hostinfo)
(tasks:hostinfo-get-port hostinfo)))
((zmq)
(zmq-transport:client-connect (tasks:hostinfo-get-interface hostinfo)
(tasks:hostinfo-get-port hostinfo)
(tasks:hostinfo-get-pubport hostinfo)))
|
︙ | | |
Modified common.scm
from [026189a548]
to [0004ed06a1].
︙ | | |
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
-
+
|
(define *waiting-queue* (make-hash-table))
(define *test-meta-updated* (make-hash-table))
(define *globalexitstatus* 0) ;; attempt to work around possible thread issues
(define *passnum* 0) ;; when running track calls to run-tests or similar
;; SERVER
(define *my-client-signature* #f)
(define *transport-type* #f)
(define *transport-type* 'fs)
(define *megatest-db* #f)
(define *rpc:listener* #f) ;; if set up for server communication this will hold the tcp port
(define *runremote* #f) ;; if set up for server communication this will hold <host port>
(define *last-db-access* (current-seconds)) ;; update when db is accessed via server
(define *max-cache-size* 0)
(define *logged-in-clients* (make-hash-table))
(define *client-non-blocking-mode* #f)
|
︙ | | |
Modified dashboard-tests.scm
from [85c2c51f69]
to [7e70dcfc3e].
︙ | | |
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
+
|
(use sqlite3 srfi-1 posix regex regex-case srfi-69)
(import (prefix sqlite3 sqlite3:))
(declare (unit dashboard-tests))
(declare (uses common))
(declare (uses db))
(declare (uses gutils))
(declare (uses ezsteps))
(include "common_records.scm")
(include "db_records.scm")
(include "run_records.scm")
(define (test-info-panel testdat store-label widgets)
(iup:frame
|
︙ | | |
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
(let* ((name (iup:attribute btn "TITLE"))
(newcolor (if (equal? name status) color "192 192 192")))
(if (not (colors-similar? newcolor (iup:attribute btn "BGCOLOR")))
(iup:attribute-set! btn "BGCOLOR" newcolor))))
btns)))
btns))))))
(define (dashboard-tests:run-html-viewer lfilename)
(let ((htmlviewercmd (configf:lookup *configdat* "setup" "htmlviewercmd")))
(if htmlviewercmd
(system (conc "(" htmlviewercmd " " lfilename " ) &"))
(iup:send-url lfilename))))
(define (dashboard-tests:run-a-step info)
#t)
(define (dashboard-tests:step-run-control testdat stepname testconfig)
(iup:dialog ;; #:close_cb (lambda (a)(exit)) ; #:expand "YES"
#:title stepname
(iup:vbox ; #:expand "YES"
(iup:label (conc "Step: " stepname "\nNB// These buttons only run the test step\nfor the purpose of debugging.\nNot all database updates are done."))
(iup:button "Re-run"
#:expand "HORIZONTAL"
#:action (lambda (obj)
(thread-start!
(make-thread (lambda ()
(ezsteps:run-from testdat stepname #f))
(conc "ezstep run single step " stepname)))))
(iup:button "Re-run and continue"
#:expand "HORIZONTAL"
#:action (lambda (obj)
(thread-start!
(make-thread (lambda ()
(ezsteps:run-from testdat stepname #f))
(conc "ezstep run from step " stepname)))))
;; (iup:button "Refresh test data"
;; #:expand "HORIZONTAL"
;; #:action (lambda (obj)
;; (print "Refresh test data " stepname))
)))
;;======================================================================
;;
;;======================================================================
(define (examine-test test-id) ;; run-id run-key origtest)
(let* ((testdat (open-run-close db:get-test-info-by-id #f test-id))
(db-path (conc *toppath* "/megatest.db"))
|
︙ | | |
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
|
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
|
-
+
-
+
-
+
-
+
-
+
-
+
+
+
-
+
|
(runname (if testdat (db:get-value-by-header (db:get-row rundat)
(db:get-header rundat)
"runname") #f))
;; These next two are intentional bad values to ensure errors if they should not
;; get filled in properly.
(logfile "/this/dir/better/not/exist")
(rundir logfile)
(testdat-path (conc rundir "/testdat.db")) ;; this gets recalculated until found
(testdat-path (conc rundir "/testdat.db")) ;; this gets recalculated until found
(teststeps (if testdat (db:get-compressed-steps test-id work-area: rundir) '()))
(testfullname (if testdat (db:test-get-fullname testdat) "Gathering data ..."))
(testname (if testdat (db:test-get-testname testdat) "n/a"))
(testmeta (if testdat
(let ((tm (open-run-close db:testmeta-get-record #f testname)))
(if tm tm (make-db:testmeta)))
(make-db:testmeta)))
(keystring (string-intersperse
(map (lambda (keyval)
;; (conc ":" (car keyval) " " (cadr keyval)))
(cadr keyval))
keydat)
"/"))
(item-path (db:test-get-item-path testdat))
(viewlog (lambda (x)
(if (file-exists? logfile)
;(system (conc "firefox " logfile "&"))
(iup:send-url logfile)
(dashboard-tests:run-html-viewer logfile)
(message-window (conc "File " logfile " not found")))))
(view-a-log (lambda (lfile)
(view-a-log (lambda (lfile)
(let ((lfilename (conc rundir "/" lfile)))
;; (print "lfilename: " lfilename)
(if (file-exists? lfilename)
;(system (conc "firefox " logfile "&"))
(iup:send-url lfilename)
(dashboard-tests:run-html-viewer lfilename)
(message-window (conc "File " lfilename " not found"))))))
(xterm (lambda (x)
(if (directory-exists? rundir)
(let ((shell (if (get-environment-variable "SHELL")
(conc "-e " (get-environment-variable "SHELL"))
"")))
(system (conc "cd " rundir
";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&")))
";mt_xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&")))
(message-window (conc "Directory " rundir " not found")))))
(widgets (make-hash-table))
(refreshdat (lambda ()
(let* ((curr-mod-time (max (file-modification-time db-path)
(if (file-exists? testdat-path)
(file-modification-time testdat-path)
(begin
(set! testdat-path (conc rundir "/testdat.db"))
0))))
(need-update (or (and (> curr-mod-time db-mod-time)
(need-update (or (and (>= curr-mod-time db-mod-time)
(> (current-milliseconds)(+ last-update 250))) ;; every half seconds if db touched
(> (current-milliseconds)(+ last-update 10000)) ;; force update even 10 seconds
request-update))
(newtestdat (if need-update
(handle-exceptions
exn
(debug:print-info 2 "test db access issue: " ((condition-property-accessor 'exn 'message) exn))
(open-run-close db:get-test-info-by-id #f test-id )))))
(cond
((and need-update newtestdat)
(set! testdat newtestdat)
(set! teststeps (db:get-compressed-steps test-id work-area: rundir))
(set! logfile (conc (db:test-get-rundir testdat) "/" (db:test-get-final_logf testdat)))
(set! rundir (db:test-get-rundir testdat))
(set! testfullname (db:test-get-fullname testdat))
;; (debug:print 0 "INFO: teststeps=" (intersperse teststeps "\n "))
(if (eq? curr-mod-time db-mod-time) ;; do only once if same
(set! db-mod-time (+ curr-mod-time 1))
(set! db-mod-time curr-mod-time)
(set! db-mod-time curr-mod-time))
(set! last-update (current-milliseconds))
(set! request-update #f) ;; met the need ...
)
(need-update ;; if this was true and yet there is no data ....
(db:test-set-testname! testdat "DEAD OR DELETED TEST")))
(if need-update
(begin
|
︙ | | |
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
(remove-test (lambda (x)
(iup:attribute-set!
command-text-box "VALUE"
(conc "xterm -geometry 180x20 -e \"megatest -remove-runs -target " keystring " :runname " runname
" -testpatt " (conc testname "/" (if (equal? item-path "")
"%"
item-path))
" -v ;echo Press any key to continue;bash -c 'read -n 1 -s'\"")))))
" -v ;echo Press any key to continue;bash -c 'read -n 1 -s'\""))))
(clean-run-execute (lambda (x)
(let ((cmd (conc "xterm -geometry 180x20 -e \""
"megatest -remove-runs -target " keystring " :runname " runname
" -testpatt " (conc testname "/" (if (equal? item-path "")
"%"
item-path))
";megatest -target " keystring " :runname " runname
" -runtests " (conc testname "/" (if (equal? item-path "")
"%"
item-path))
" ;echo Press any key to continue;bash -c 'read -n 1 -s'\"")))
(system (conc cmd " &")))))
(remove-test (lambda (x)
(iup:attribute-set!
command-text-box "VALUE"
(conc "xterm -geometry 180x20 -e \"megatest -remove-runs -target " keystring " :runname " runname
" -testpatt " (conc testname "/" (if (equal? item-path "")
"%"
item-path))
" -v ;echo Press any key to continue;bash -c 'read -n 1 -s'\""))
)))
(cond
((not testdat)(begin (print "ERROR: bad test info for " test-id)(exit 1)))
((not rundat)(begin (print "ERROR: found test info but there is a problem with the run info for " run-id)(exit 1)))
(else
;; (test-set-status! db run-id test-name state status itemdat)
(set! self ;
(iup:dialog #:close_cb (lambda (a)(exit)) ; #:expand "YES"
|
︙ | | |
428
429
430
431
432
433
434
435
436
437
438
439
440
441
|
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
|
+
|
(iup:frame #:title "Actions"
(iup:vbox
(iup:hbox
(iup:button "View Log" #:action viewlog #:size "80x")
(iup:button "Start Xterm" #:action xterm #:size "80x")
(iup:button "Run Test" #:action run-test #:size "80x")
(iup:button "Clean Test" #:action remove-test #:size "80x")
(iup:button "CleanRunExecute!" #:action clean-run-execute #:size "80x")
(iup:button "Kill All Jobs" #:action kill-jobs #:size "80x")
(iup:button "Close" #:action (lambda (x)(exit)) #:size "80x"))
(apply
iup:hbox
(list command-text-box command-launch-button))))
(set-fields-panel test-id testdat)
(let ((tabs
|
︙ | | |
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
|
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
|
+
-
+
-
-
+
+
+
+
+
|
#:numlin 30
#:numcol-visible 6
#:numlin-visible 5
#:click-cb (lambda (obj lin col status)
;; (if (equal? col 6)
(let* ((mtrx-rc (conc lin ":" 6))
(fname (iup:attribute obj mtrx-rc))) ;; col))))
(if (eq? col 6)
(view-a-log fname)))
(view-a-log fname)
;; (print "obj: " obj " mtrx-rc: " mtrx-rc " fname: " fname " lin: " lin " col: " col " status: " status)))
)))
(iup:show
(dashboard-tests:step-run-control
testdat
(iup:attribute obj (conc lin ":" 1))
teststeps))))))))
;; (let loop ((count 0))
;; (iup:attribute-set! steps-matrix "FITTOTEXT" (conc "L" count))
;; (if (< count 30)
;; (loop (+ count 1))))
(iup:attribute-set! steps-matrix "0:1" "Step Name")
(iup:attribute-set! steps-matrix "0:2" "Start")
(iup:attribute-set! steps-matrix "0:3" "End")
|
︙ | | |
Modified dashboard.scm
from [42438bdc1e]
to [caac9567a8].
︙ | | |
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
-
+
|
(refvals '())
(indx 0)
(lbs '()))
(let* ((lb (let ((lb (list-ref key-listboxes indx)))
(if lb
lb
(iup:listbox
;; #:size "x10"
#:size "45x50"
#:fontsize "10"
#:expand "YES" ;; "VERTICAL"
;; #:dropdown "YES"
#:editbox "YES"
#:action (lambda (obj a b c)
(action-proc))
#:caret_cb (lambda (obj a b c)(action-proc))
|
︙ | | |
747
748
749
750
751
752
753
754
755
756
757
758
759
760
|
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
|
+
|
(dboard:data-set-test-patts!
*data*
(dboard:lines->test-patt b))
(dashboard:update-run-command))
#:value (dboard:test-patt->lines
(dboard:data-get-test-patts *data*))
#:expand "YES"
#:size "x50"
#:multiline "YES")))
(set! test-patterns-textbox tb)
tb))
(iup:frame
#:title "Target"
;; Target selectors
(apply iup:hbox
|
︙ | | |
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
|
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
|
+
-
+
-
+
|
(if *db* (sqlite3:finalize! *db*))))
(cdb:remote-run examine-run *db* runid)))
(begin
(print "ERROR: runid is not a number " (args:get-arg "-run"))
(exit 1)))))
((args:get-arg "-test")
(let ((testid (string->number (args:get-arg "-test"))))
(if (and (number? testid)
(if testid
(>= testid 0))
(examine-test testid)
(begin
(print "ERROR: testid is not a number " (args:get-arg "-test"))
(debug:print 3 "INFO: tried to open test with invalid test-id. " (args:get-arg "-test"))
(exit 1)))))
((args:get-arg "-guimonitor")
(gui-monitor *db*))
(else
(set! uidat (make-dashboard-buttons *num-runs* *num-tests* *dbkeys*))
(iup:callback-set! *tim*
"ACTION_CB"
|
︙ | | |
Modified docs/manual/megatest_manual.html
from [b1f57fca91]
to [97d3fb8ca7].
︙ | | |
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
|
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
|
+
+
+
+
+
+
+
+
|
# diff diff %file1% %file2%
# This builtin rule is applied if a <waivername>.logpro file exists
# logpro diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html</tt></pre>
</div></div>
</div>
</div>
<div class="sect2">
<h3 id="_ezsteps">Ezsteps</h3>
<div class="paragraph"><p>To transfer the environment to the next step you can do the following:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$MT_MEGATEST -env2file .ezsteps/${stepname}</tt></pre>
</div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_example_appendix">Appendix A: Example Appendix</h2>
<div class="sectionbody">
<div class="paragraph"><p>One or more optional appendixes go here at section level zero.</p></div>
<div class="sect2">
|
︙ | | |
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
|
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
|
-
+
|
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Version 1.0<br />
Last updated 2013-07-30 09:23:34 MST
Last updated 2013-08-01 22:59:08 MST
</div>
</div>
</body>
</html>
|
Modified docs/manual/reference.txt
from [09090d6f26]
to [6d8b51499a].
︙ | | |
136
137
138
139
140
141
142
143
144
145
|
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
+
+
+
+
+
+
+
+
|
# This builtin rule is the default if there is no <waivername>.logpro file
# diff diff %file1% %file2%
# This builtin rule is applied if a <waivername>.logpro file exists
# logpro diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html
-----------------
Ezsteps
~~~~~~~
To transfer the environment to the next step you can do the following:
----------------------------
$MT_MEGATEST -env2file .ezsteps/${stepname}
----------------------------
:numbered!:
|
Modified ezsteps.scm
from [3ce551206d]
to [ad9d3c507a].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
;; Copyright 2006-2012, Matthew Welland.
;;
;; This program is made available under the GNU GPL version 2.0 or
;; greater. See the accompanying file COPYING for details.
;;
;; This program is distributed WITHOUT ANY WARRANTY; without even the
;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;; PURPOSE.
;; strftime('%m/%d/%Y %H:%M:%S','now','localtime')
(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking)
(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking directory-utils)
(import (prefix sqlite3 sqlite3:))
(declare (unit ezsteps))
(declare (uses db))
(declare (uses common))
(declare (uses items))
(declare (uses runconfig))
(include "common_records.scm")
; (include "key_records.scm")
; (include "db_records.scm")
; (include "run_records.scm")
(include "key_records.scm")
(include "db_records.scm")
(include "run_records.scm")
(define (ezsteps:run-from testdat start-step-name run-one)
(let* ((test-run-dir (db:test-get-rundir testdat))
(testconfig (read-config (conc test-run-dir "/testconfig") #f #t environ-patt: "pre-launch-env-vars"))
(ezstepslst (hash-table-ref/default testconfig "ezsteps" '()))
(run-mutex (make-mutex))
(rollup-status 0)
(exit-info (vector #t #t #t))
(test-id (db:test-get-id testdat))
(test-name (db:test-get-testname testdat))
(kill-job #f)) ;; for future use (on re-factoring with launch.scm code
(let loop ((count 5))
(if (file-exists? test-run-dir)
(push-directory test-run-dir)
(if (> count 0)
(begin
(debug:print 0 "WARNING: ezsteps attempting to run but test run directory " test-run-dir " is not there. Waiting and trying again " count " more times")
(sleep 3)
(loop (- count 1))))))
(debug:print-info 0 "Running in directory " test-run-dir)
(if (not (file-exists? ".ezsteps"))(create-directory ".ezsteps"))
;; if ezsteps was defined then we are sure to have at least one step but check anyway
(if (not (> (length ezstepslst) 0))
(message-window "ERROR: You can only re-run steps defined via ezsteps")
(begin
(let loop ((ezstep (car ezstepslst))
(tal (cdr ezstepslst))
(prevstep #f)
(runflag #f)) ;; flag used to skip steps when not starting at the beginning
(if (vector-ref exit-info 1)
(let* ((stepname (car ezstep)) ;; do stuff to run the step
(stepinfo (cadr ezstep))
(stepparts (string-match (regexp "^(\\{([^\\}]*)\\}\\s*|)(.*)$") stepinfo))
(stepparms (list-ref stepparts 2)) ;; for future use, {VAR=1,2,3}, run step for each
(stepcmd (list-ref stepparts 3))
(script "") ; "#!/bin/bash\n") ;; yep, we depend on bin/bash FIXME!!!
(logpro-used #f))
;; Skip steps until hit start-step-name
;;
(if (and start-step-name
(not runflag))
(if (equal? stepname start-step-name)
(set! runflag #t) ;; and continue
(if (not (null? tal))
(loop (car tal)(cdr tal) stepname #f))))
(debug:print 4 "ezsteps:\n stepname: " stepname " stepinfo: " stepinfo " stepparts: " stepparts
" stepparms: " stepparms " stepcmd: " stepcmd)
(if (file-exists? (conc stepname ".logpro"))(set! logpro-used #t))
;; call the command using mt_ezstep
(set! script (conc "mt_ezstep " stepname " " (if prevstep prevstep "-") " " stepcmd))
(debug:print 4 "script: " script)
;; DO NOT remote
(db:teststep-set-status! #f test-id stepname "start" "-" #f #f work-area: test-run-dir)
;; now launch
(let ((pid (process-run script)))
(let processloop ((i 0))
(let-values (((pid-val exit-status exit-code)(process-wait pid #t)))
(mutex-lock! run-mutex)
(vector-set! exit-info 0 pid)
(vector-set! exit-info 1 exit-status)
(vector-set! exit-info 2 exit-code)
(mutex-unlock! run-mutex)
(if (eq? pid-val 0)
(begin
(thread-sleep! 2)
(processloop (+ i 1))))
))
(let ((exinfo (vector-ref exit-info 2))
(logfna (if logpro-used (conc stepname ".html") "")))
;; testing if procedures called in a remote call cause problems (ans: no or so I suspect)
(db:teststep-set-status! #f test-id stepname "end" exinfo #f logfna work-area: test-run-dir))
(if logpro-used
(cdb:test-set-log! *runremote* test-id (conc stepname ".html")))
;; set the test final status
(let* ((this-step-status (cond
((and (eq? (vector-ref exit-info 2) 2) logpro-used) 'warn)
((eq? (vector-ref exit-info 2) 0) 'pass)
(else 'fail)))
(overall-status (cond
((eq? rollup-status 2) 'warn)
((eq? rollup-status 0) 'pass)
(else 'fail)))
(next-status (cond
((eq? overall-status 'pass) this-step-status)
((eq? overall-status 'warn)
(if (eq? this-step-status 'fail) 'fail 'warn))
(else 'fail))))
(debug:print 4 "Exit value received: " (vector-ref exit-info 2) " logpro-used: " logpro-used
" this-step-status: " this-step-status " overall-status: " overall-status
" next-status: " next-status " rollup-status: " rollup-status)
(case next-status
((warn)
(set! rollup-status 2)
;; NB// test-set-status! does rdb calls under the hood
(tests:test-set-status! test-id "RUNNING" "WARN"
(if (eq? this-step-status 'warn) "Logpro warning found" #f)
#f))
((pass)
(tests:test-set-status! test-id "RUNNING" "PASS" #f #f))
(else ;; 'fail
(set! rollup-status 1) ;; force fail
(tests:test-set-status! test-id "RUNNING" "FAIL" (conc "Failed at step " stepname) #f)
))))
(if (and (steprun-good? logpro-used (vector-ref exit-info 2))
(not (null? tal)))
(if (not run-one) ;; if we got here we completed the step, if run-one is true, stop
(loop (car tal) (cdr tal) stepname runflag))))
(debug:print 4 "WARNING: a prior step failed, stopping at " ezstep)))
;; Once done with step/steps update the test record
;;
(let* ((item-path (db:test-get-item-path testdat)) ;; (item-list->path itemdat))
(testinfo (cdb:get-test-info-by-id *runremote* test-id))) ;; refresh the testdat, call it iteminfo in case need prev/curr
;; Am I completed?
(if (equal? (db:test-get-state testinfo) "RUNNING") ;; (not (equal? (db:test-get-state testinfo) "COMPLETED"))
(let ((new-state (if kill-job "KILLED" "COMPLETED") ;; (if (eq? (vector-ref exit-info 2) 0) ;; exited with "good" status
;; "COMPLETED"
;; (db:test-get-state testinfo))) ;; else preseve the state as set within the test
)
(new-status (cond
((not (vector-ref exit-info 1)) "FAIL") ;; job failed to run
((eq? rollup-status 0)
;; if the current status is AUTO the defer to the calculated value (i.e. leave this AUTO)
(if (equal? (db:test-get-status testinfo) "AUTO") "AUTO" "PASS"))
((eq? rollup-status 1) "FAIL")
((eq? rollup-status 2)
;; if the current status is AUTO the defer to the calculated value but qualify (i.e. make this AUTO-WARN)
(if (equal? (db:test-get-status testinfo) "AUTO") "AUTO-WARN" "WARN"))
(else "FAIL")))) ;; (db:test-get-status testinfo)))
(debug:print-info 2 "Test NOT logged as COMPLETED, (state=" (db:test-get-state testinfo) "), updating result, rollup-status is " rollup-status)
(tests:test-set-status! test-id
new-state
new-status
(args:get-arg "-m") #f)
;; need to update the top test record if PASS or FAIL and this is a subtest
(if (not (equal? item-path ""))
(cdb:roll-up-pass-fail-counts *runremote* run-id test-name item-path new-status))))
;; for automated creation of the rollup html file this is a good place...
(if (not (equal? item-path ""))
(tests:summarize-items #f run-id test-name #f)) ;; don't force - just update if no
)))
(pop-directory)
rollup-status))
|
Modified launch.scm
from [3bc126dd88]
to [7692281ad3].
︙ | | |
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
-
+
|
runscript))))) ;; assume it is on the path
(rollup-status 0))
(change-directory top-path)
(debug:print 2 "Exectuing " test-name " (id: " test-id ") on " (get-host-name))
;; Setup the *runremote* global var
(if *runremote* (debug:print 2 "ERROR: I'm not expecting *runremote* to be set at this time"))
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
;; (set! *transport-type* (string->symbol transport))
(set! keys (cdb:remote-run db:get-keys #f))
(set! keyvals (keys:target->keyval keys target))
;; apply pre-overrides before other variables. The pre-override vars must not
;; clobbers things from the official sources such as megatest.config and runconfigs.config
(if (string? set-vars)
(let ((varpairs (string-split set-vars ",")))
(debug:print 4 "varpairs: " varpairs)
|
︙ | | |
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
+
|
varpairs)))
(setenv "MT_TEST_RUN_DIR" work-area)
(setenv "MT_TEST_NAME" test-name)
(setenv "MT_ITEM_INFO" (conc itemdat))
(setenv "MT_RUNNAME" runname)
(setenv "MT_MEGATEST" megatest)
(setenv "MT_TARGET" target)
(setenv "MT_LINKTREE" (configf:lookup *configdat* "setup" "linktree"))
(if mt-bindir-path (setenv "PATH" (conc (getenv "PATH") ":" mt-bindir-path)))
;; (change-directory top-path)
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, exiting")
;; (sqlite3:finalize! db)
;; (sqlite3:finalize! tdb)
|
︙ | | |
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
+
|
(loop (calc-minutes)))))))
(th1 (make-thread monitorjob))
(th2 (make-thread runit)))
(set! job-thread th2)
(thread-start! th1)
(thread-start! th2)
(thread-join! th2)
(thread-sleep! 0.1) ;; give thread th1 a chance to be done TODO: Verify this is needed.
(mutex-lock! m)
(let* ((item-path (item-list->path itemdat))
(testinfo (cdb:get-test-info-by-id *runremote* test-id))) ;; )) ;; run-id test-name item-path)))
;; Am I completed?
(if (equal? (db:test-get-state testinfo) "RUNNING") ;; (not (equal? (db:test-get-state testinfo) "COMPLETED"))
(let ((new-state (if kill-job? "KILLED" "COMPLETED") ;; (if (eq? (vector-ref exit-info 2) 0) ;; exited with "good" status
;; "COMPLETED"
|
︙ | | |
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
|
;; set up the very basics needed for doing anything here.
(define (setup-for-run)
;; would set values for KEYS in the environment here for better support of env-override but
;; have chicken/egg scenario. need to read megatest.config then read it again. Going to
;; pass on that idea for now
;; special case
(if (not (hash-table? *configdat*)) ;; no need to re-open on every call
(begin
(set! *configinfo* (find-and-read-config
(if (args:get-arg "-config")(args:get-arg "-config") "megatest.config")
environ-patt: "env-override"
given-toppath: (get-environment-variable "MT_RUN_AREA_HOME")
pathenvvar: "MT_RUN_AREA_HOME"))
(set! *configdat* (if (car *configinfo*)(car *configinfo*) #f))
(set! *toppath* (if (car *configinfo*)(cadr *configinfo*) #f))
(if *toppath*
(setenv "MT_RUN_AREA_HOME" *toppath*) ;; to be deprecated
(debug:print 0 "ERROR: failed to find the top path to your run setup."))
(set! *configinfo* (find-and-read-config
(if (args:get-arg "-config")(args:get-arg "-config") "megatest.config")
environ-patt: "env-override"
given-toppath: (get-environment-variable "MT_RUN_AREA_HOME")
pathenvvar: "MT_RUN_AREA_HOME"))
(set! *configdat* (if (car *configinfo*)(car *configinfo*) #f))
(set! *toppath* (if (car *configinfo*)(cadr *configinfo*) #f))
(if *toppath*
(setenv "MT_RUN_AREA_HOME" *toppath*) ;; to be deprecated
(debug:print 0 "ERROR: failed to find the top path to your Megatest area."))))
*toppath*)
(define (get-best-disk confdat)
(let* ((disks (hash-table-ref/default confdat "disks" #f))
(best #f)
(bestsize 0))
(if disks
|
︙ | | |
Modified megatest-version.scm
from [187c3f7fbf]
to [31ffe3a468].
1
2
3
4
5
6
7
|
1
2
3
4
5
6
7
|
-
+
|
;; Always use two digit decimal
;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00..
(declare (unit megatest-version))
(define megatest-version 1.6)
(define megatest-version 1.5511)
|
Modified megatest.scm
from [d8bccf0232]
to [7c0eaf00e3].
︙ | | |
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
|
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
+
-
-
-
-
+
+
+
+
|
(if (args:get-arg "-version")
(begin
(print megatest-version)
(exit)))
(define *didsomething* #f)
;; Force default transport to fs
(if (and (or (args:get-arg "-list-targets")
(args:get-arg "-list-db-targets"))
(not (args:get-arg "-transport")))
(hash-table-set! args:arg-hash "-transport" "fs"))
;; (if ;; (and (or (args:get-arg "-list-targets")
;; ;; (args:get-arg "-list-db-targets"))
;; (not (args:get-arg "-transport"))
;; (hash-table-set! args:arg-hash "-transport" "fs"))
;;======================================================================
;; Misc setup stuff
;;======================================================================
(debug:setup)
|
︙ | | |
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
+
+
+
+
+
-
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
|
;;======================================================================
;; Start the server - can be done in conjunction with -runall or -runtests (one day...)
;; we start the server if not running else start the client thread
;;======================================================================
(if (args:get-arg "-server")
;; Server? Start up here.
;;
(let ((tl (setup-for-run))
(transport (or (configf:lookup *configdat* "setup" "transport")
(let ((transport (args:get-arg "-transport" "http")))
(args:get-arg "-transport" "http"))))
(debug:print 2 "Launching server using transport " transport)
(server:launch (string->symbol transport)))
;; Not a server? This section will decide how to communicate
;;
;; Setup client for all expect listed here
(if (not (null? (lset-intersection
(if (null? (lset-intersection
equal?
(hash-table-keys args:arg-hash)
'("-runtests" "-list-runs" "-rollup"
'("-list-servers"
"-remove-runs" "-lock" "-unlock"
"-update-meta" "-extract-ods"))))
"-stop-server"
"-show-cmdinfo")))
(if (setup-for-run)
(let loop ((servers (open-run-close tasks:get-best-server tasks:open-db))
(trycount 0))
(if (or (not servers)
(null? servers))
(begin
(if (even? trycount) ;; just do the server start every other time through this loop (every 8 seconds)
(begin
(begin
(debug:print 0 "INFO: Starting server as none running ...")
;; (server:launch (string->symbol (args:get-arg "-transport" "http"))))
;; no need to use fork, no need to do the list-servers trick. Just start the damn server, it will exit on it's own
;; if there is an existing server
;; if not list or kill then start a client (if appropriate)
(if (or (args-defined? "-h" "-version" "-gen-megatest-area" "-gen-megatest-test")
(eq? (length (hash-table-keys args:arg-hash)) 0))
(debug:print-info 1 "Server connection not needed")
;; ok, so lets connect to the server
(let* ((transport-from-config (configf:lookup *configdat* "setup" "transport"))
(transport-from-cmdln (args:get-arg "-transport"))
(transport-from-cmdinfo (if (getenv "MT_CMDINFO")
(let ((res (assoc 'transport
(system "megatest -server - -daemonize")
(thread-sleep! 3)
;; (process-run (car (argv)) (list "-server" "-" "-daemonize" "-transport" (args:get-arg "-transport" "http")))
(read
(open-input-string
(base64:base64-decode
(getenv "MT_CMDINFO")))))))
(if res (cadr res) #f))
#f))
(chosen-transport (string->symbol (or transport-from-cmdln
transport-from-cmdinfo
transport-from-config
"fs"))))
(debug:print 2 "chosen-transport: " chosen-transport " have; config=" transport-from-config ", cmdln=" transport-from-cmdln ", cmdinfo=" transport-from-cmdinfo)
(case chosen-transport
;; (system (conc "megatest -list-servers | egrep '" megatest-version ".*alive' || megatest -server - -daemonize && sleep 3"))
;; (process-fork (lambda ()
;; (daemon:ize)
;; (server:launch (string->symbol (args:get-arg "-transport" "http")))))
((http)
(set! *transport-type 'http)
(server:ensure-running)
(client:launch))
(else ;; (fs)
(set! *transport-type* 'fs)
(set! *megatest-db* (open-db))))))))))
;; (cond
;; ;; command line overrides other mechanisms
;; (transport-from-cmdln
)
(begin
(debug:print-info 0 "Waiting for server to start")
(thread-sleep! 4)))
(if (< trycount 10)
(loop (open-run-close tasks:get-best-server tasks:open-db)
(+ trycount 1))
;; (if (equal? transport-from-cmdln "fs")
;; (set! *transport-type* 'fs)
;; (begin
;; (server:ensure-running)
;; (client:launch))))
;; ;; cmdinfo is second priority
;; (transport-from-cmdinfo
;; (if (equal? transport-from-cmdinfo "fs")
;; (set! *transport-type* 'fs)
;; (begin
;; (server:ensure-running)
;; (client:launch))))
(debug:print 0 "WARNING: Couldn't start or find a server.")))
(debug:print 0 "INFO: Server(s) running " servers)
)))))
;; ;; config file is next highest priority for determinining transport
;; (transport-from-config
;; (if (equal? transport-from-config "fs")
;; (set! *transport-type* 'fs)
;; (begin
;; (server:ensure-running)
;; (client:launch))))
;; (else
;; (set! *transport-type* 'fs)))))))))
(if (or (args:get-arg "-list-servers")
(args:get-arg "-stop-server"))
(let ((tl (setup-for-run)))
(if tl
(let* ((servers (open-run-close tasks:get-all-servers tasks:open-db))
(fmtstr "~5a~12a~8a~20a~24a~10a~10a~10a~10a\n")
|
︙ | | |
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
-
+
-
-
-
-
-
-
|
(begin
(debug:print-info 0 "Attempting to stop server with pid " pid)
(tasks:kill-server status hostname pullport pid transport)))))
servers)
(debug:print-info 1 "Done with listservers")
(set! *didsomething* #t)
(exit)) ;; must do, would have to add checks to many/all calls below
(exit)))
(exit))))
;; if not list or kill then start a client (if appropriate)
(if (or (args-defined? "-h" "-version" "-gen-megatest-area" "-gen-megatest-test")
(eq? (length (hash-table-keys args:arg-hash)) 0))
(debug:print-info 1 "Server connection not needed")
;; ok, so lets connect to the server
(client:launch)))
;;======================================================================
;; Weird special calls that need to run *after* the server has started?
;;======================================================================
(if (args:get-arg "-list-targets")
(let ((targets (common:get-runconfig-targets)))
|
︙ | | |
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
|
+
-
+
+
-
-
-
-
-
+
+
+
+
+
+
|
((string=? (args:get-arg "-dumpmode") "json")
(json-write data))
(else
(debug:print 0 "ERROR: -dumpmode of " (args:get-arg "-dumpmode") " not recognised")))
(set! *didsomething* #t)))
(if (args:get-arg "-show-config")
(let ((tl (setup-for-run))
(let ((data *configdat*)) ;; (read-config "megatest.config" #f #t)))
(data *configdat*)) ;; (read-config "megatest.config" #f #t)))
;; keep this one local
(cond
((not (args:get-arg "-dumpmode"))
(pp (hash-table->alist data)))
((string=? (args:get-arg "-dumpmode") "json")
(json-write data))
(else
(debug:print 0 "ERROR: -dumpmode of " (args:get-arg "-dumpmode") " not recognised")))
(set! *didsomething* #t)))
(if (args:get-arg "-show-cmdinfo")
(if (getenv "MT_CMDINFO")
(let ((data (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO"))))))
(if (equal? (args:get-arg "-dumpmode") "json")
(json-write data)
(pp data))
(set! *didsomething* #t)))
(let ((data (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO"))))))
(if (equal? (args:get-arg "-dumpmode") "json")
(json-write data)
(pp data))
(set! *didsomething* #t))
(debug:print-info 0 "environment variable MT_CMDINFO is not set")))
;;======================================================================
;; Remove old run(s)
;;======================================================================
;; since several actions can be specified on the command line the removal
;; is done first
|
︙ | | |
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
|
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
-
+
|
(db #f)
(state (args:get-arg ":state"))
(status (args:get-arg ":status"))
(target (args:get-arg "-target"))
(toppath (assoc/default 'toppath cmdinfo)))
(change-directory toppath)
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
;; (set! *transport-type* (string->symbol transport))
(if (not target)
(begin
(debug:print 0 "ERROR: -target is required.")
(exit 1)))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, giving up on -test-paths or -test-files, exiting")
|
︙ | | |
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
|
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
-
+
|
(itemdat (assoc/default 'itemdat cmdinfo))
(db #f)
(state (args:get-arg ":state"))
(status (args:get-arg ":status"))
(target (args:get-arg "-target")))
(change-directory testpath)
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
;; (set! *transport-type* (string->symbol transport))
(if (not target)
(begin
(debug:print 0 "ERROR: -target is required.")
(exit 1)))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, giving up on -archive, exiting")
|
︙ | | |
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
|
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
|
+
-
+
|
(run-id (assoc/default 'run-id cmdinfo))
(test-id (assoc/default 'test-id cmdinfo))
(itemdat (assoc/default 'itemdat cmdinfo))
(work-area (assoc/default 'work-area cmdinfo))
(db #f))
(change-directory testpath)
;; (set! *runremote* runremote)
;; The transport is handled earlier in the loading process of megatest.
(set! *transport-type* (string->symbol transport))
;; (set! *transport-type* (string->symbol transport))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, exiting")
(exit 1)))
(if (and state status)
;; DO NOT remote run, makes calls to the testdat.db test db.
(db:teststep-set-status! db test-id step state status msg logfile work-area: work-area)
|
︙ | | |
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
|
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
|
-
+
-
+
|
(test-id (assoc/default 'test-id cmdinfo))
(itemdat (assoc/default 'itemdat cmdinfo))
(work-area (assoc/default 'work-area cmdinfo))
(db #f) ;; (open-db))
(state (args:get-arg ":state"))
(status (args:get-arg ":status")))
;; (set! *runremote* runremote)
(set! *transport-type* (string->symbol transport))
;; (set! *transport-type* (string->symbol transport))
(if (not (setup-for-run))
(begin
(debug:print 0 "Failed to setup, exiting")
(exit 1)))
(debug:print-info 1 "Runing -runstep, first change to directory " work-area)
(if (args:get-arg "-runstep")(debug:print-info 1 "Running -runstep, first change to directory " work-area))
(change-directory work-area)
;; can setup as client for server mode now
;; (client:setup)
(if (args:get-arg "-load-test-data")
;; has sub commands that are rdb:
;; DO NOT put this one into either cdb:remote-run or open-run-close
|
︙ | | |
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
|
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
|
-
-
|
(args:get-arg "-load"))
(let* ((toppath (setup-for-run))
(db (if toppath (open-db) #f)))
(if db
(begin
(set! *db* db)
(set! *client-non-blocking-mode* #t)
;; (client:setup)
;; (client:launch)
(import readline)
(import apropos)
(gnu-history-install-file-manager
(string-append
(or (get-environment-variable "HOME") ".") "/.megatest_history"))
(current-input-port (make-gnu-readline-port "megatest> "))
(if (args:get-arg "-repl")
|
︙ | | |
Modified runs.scm
from [3559f7453d]
to [a6403613e5].
︙ | | |
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
|
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
|
+
-
+
+
+
+
|
(cdb:tests-register-test *runremote* run-id test-name item-path)
(set! test-id (cdb:remote-run db:get-test-id #f run-id test-name item-path))))
(debug:print-info 4 "test-id=" test-id ", run-id=" run-id ", test-name=" test-name ", item-path=\"" item-path "\"")
(set! testdat (cdb:get-test-info-by-id *runremote* test-id))))
(if (not testdat) ;; should NOT happen
(debug:print 0 "ERROR: failed to get test record for test-id " test-id))
(set! test-id (db:test-get-id testdat))
(if (file-exists? test-path)
(change-directory test-path)
(change-directory test-path)
(begin
(debug:print "ERROR: test run path not created before attempting to run the test. Perhaps you are running -remove-runs at the same time?")
(change-directory *toppath*)))
(case (if force ;; (args:get-arg "-force")
'NOT_STARTED
(if testdat
(string->symbol (test:get-state testdat))
'failed-to-insert))
((failed-to-insert)
(debug:print 0 "ERROR: Failed to insert the record into the db"))
|
︙ | | |
Modified server.scm
from [1157749304]
to [9e4ffe8744].
︙ | | |
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
-
+
|
(if (not (setup-for-run))
(begin
(debug:print 0 "ERROR: cannot find megatest.config, exiting")
(exit))))
(debug:print-info 2 "Starting server using " transport " transport")
(set! *transport-type* transport)
(case transport
((fs) (exit)) ;; there is no "fs" transport
((fs) (exit)) ;; there is no "fs" server transport
((http) (http-transport:launch))
((zmq) (zmq-transport:launch))
(else
(debug:print "WARNING: unrecognised transport " transport)
(exit))))
;;======================================================================
|
︙ | | |
115
116
117
118
119
120
121
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
(let ((pub-socket (vector-ref *runremote* 1)))
(send-message pub-socket return-addr send-more: #t)
(send-message pub-socket (db:obj->string (vector success/fail query-sig result)))))
(else
(debug:print 0 "ERROR: unrecognised transport type: " *transport-type*)
result)))
(define (server:ensure-running)
(let loop ((servers (open-run-close tasks:get-best-server tasks:open-db))
(trycount 0))
(if (or (not servers)
(null? servers))
(begin
(if (even? trycount) ;; just do the server start every other time through this loop (every 8 seconds)
(let ((cmdln (conc (if (getenv "MT_MEGATEST") (getenv "MT_MEGATEST") "megatest")
" -server - -daemonize")))
(debug:print 0 "INFO: Starting server (" cmdln ") as none running ...")
;; (server:launch (string->symbol (args:get-arg "-transport" "http"))))
;; no need to use fork, no need to do the list-servers trick. Just start the damn server, it will exit on it's own
;; if there is an existing server
(system cmdln)
(thread-sleep! 3)
;; (process-run (car (argv)) (list "-server" "-" "-daemonize" "-transport" (args:get-arg "-transport" "http")))
)
(begin
(debug:print-info 0 "Waiting for server to start")
(thread-sleep! 4)))
(if (< trycount 10)
(loop (open-run-close tasks:get-best-server tasks:open-db)
(+ trycount 1))
(debug:print 0 "WARNING: Couldn't start or find a server.")))
(debug:print 2 "INFO: Server(s) running " servers)
)))
|
Modified tasks.scm
from [d74494eba8]
to [4666e559d1].
︙ | | |
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
-
+
+
+
+
+
+
-
+
|
(define (tasks:have-clients? mdb server-id)
(null? (tasks:get-logged-in-clients mdb server-id)))
;; ping each server in the db and return first found that responds.
;; remove any others. will not necessarily remove all!
(define (tasks:get-best-server mdb)
(let ((res '())
(best #f))
(best #f)
(transport (if (and *transport-type*
(not (eq? *transport-type* 'fs)))
(conc *transport-type*)
"%")))
(sqlite3:for-each-row
(lambda (id interface port pubport transport pid hostname)
(set! res (cons (vector id interface port pubport transport pid hostname) res))
;;(debug:print-info 2 "Found existing server " hostname ":" port " registered in db"))
)
mdb
"SELECT id,interface,port,pubport,transport,pid,hostname FROM servers
WHERE strftime('%s','now')-heartbeat < 10
AND mt_version=? AND transport LIKE ?
AND mt_version=? ORDER BY start_time DESC LIMIT 1;" (common:version-signature))
ORDER BY start_time DESC LIMIT 1;" (common:version-signature) transport)
;; for now we are keeping only one server registered in the db, return #f or first server found
(if (null? res) #f (car res))))
;; BUG: This logic is probably needed unless methodology changes completely...
;;
;; (if (null? res) #f
;; (let loop ((hed (car res))
|
︙ | | |
Modified tests.scm
from [def3cc0191]
to [3fc8cabe45].
︙ | | |
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
|
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
(testconfig (tests:get-testconfig (db:test-get-testname testdat) test-registry #f))
(test-rundir (db:test-get-rundir testdat))
(prev-rundir (db:test-get-rundir prev-testdat))
(waivers (configf:section-vars testconfig "waivers"))
(waiver-rx (regexp "^(\\S+)\\s+(.*)$"))
(diff-rule "diff %file1% %file2%")
(logpro-rule "diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html"))
(if (not (file-exists? test-rundir))
(begin
(debug:print 0 "ERROR: test run directory is gone, cannot propagate waiver")
#f)
(begin
(push-directory test-rundir)
(let ((result (if (null? waivers)
#f
(let loop ((hed (car waivers))
(tal (cdr waivers)))
(debug:print 0 "INFO: Applying waiver rule \"" hed "\"")
(let* ((waiver (configf:lookup testconfig "waivers" hed))
(wparts (if waiver (string-match waiver-rx waiver) #f))
(waiver-rule (if wparts (cadr wparts) #f))
(waiver-glob (if wparts (caddr wparts) #f))
(logpro-file (if waiver
(let ((fname (conc hed ".logpro")))
(if (file-exists? fname)
fname
(begin
(debug:print 0 "INFO: No logpro file " fname " falling back to diff")
#f)))
#f))
;; if rule by name of waiver-rule is found in testconfig - use it
;; else if waivername.logpro exists use logpro-rule
;; else default to diff-rule
(rule-string (let ((rule (configf:lookup testconfig "waiver_rules" waiver-rule)))
(if rule
rule
(if logpro-file
logpro-rule
(begin
(debug:print 0 "INFO: No logpro file " logpro-file " found, using diff rule")
diff-rule)))))
;; (string-substitute "%file1%" "foofoo.txt" "This is %file1% and so is this %file1%." #t)
(processed-cmd (string-substitute
"%file1%" (conc test-rundir "/" waiver-glob)
(string-substitute
"%file2%" (conc prev-rundir "/" waiver-glob)
(string-substitute
"%waivername%" hed rule-string #t) #t) #t))
(res #f))
(debug:print 0 "INFO: waiver command is \"" processed-cmd "\"")
(if (eq? (system processed-cmd) 0)
(if (null? tal)
#t
(loop (car tal)(cdr tal)))
#f))))))
(pop-directory)
result)))
(push-directory test-rundir)
(let ((result (if (null? waivers)
#f
(let loop ((hed (car waivers))
(tal (cdr waivers)))
(debug:print 0 "INFO: Applying waiver rule \"" hed "\"")
(let* ((waiver (configf:lookup testconfig "waivers" hed))
(wparts (if waiver (string-match waiver-rx waiver) #f))
(waiver-rule (if wparts (cadr wparts) #f))
(waiver-glob (if wparts (caddr wparts) #f))
(logpro-file (if waiver
(let ((fname (conc hed ".logpro")))
(if (file-exists? fname)
fname
(begin
(debug:print 0 "INFO: No logpro file " fname " falling back to diff")
#f)))
#f))
;; if rule by name of waiver-rule is found in testconfig - use it
;; else if waivername.logpro exists use logpro-rule
;; else default to diff-rule
(rule-string (let ((rule (configf:lookup testconfig "waiver_rules" waiver-rule)))
(if rule
rule
(if logpro-file
logpro-rule
(begin
(debug:print 0 "INFO: No logpro file " logpro-file " found, using diff rule")
diff-rule)))))
;; (string-substitute "%file1%" "foofoo.txt" "This is %file1% and so is this %file1%." #t)
(processed-cmd (string-substitute
"%file1%" (conc test-rundir "/" waiver-glob)
(string-substitute
"%file2%" (conc prev-rundir "/" waiver-glob)
(string-substitute
"%waivername%" hed rule-string #t) #t) #t))
(res #f))
(debug:print 0 "INFO: waiver command is \"" processed-cmd "\"")
(if (eq? (system processed-cmd) 0)
(if (null? tal)
#t
(loop (car tal)(cdr tal)))
#f))))))
(pop-directory)
result)))))
;; Do not rpc this one, do the underlying calls!!!
(define (tests:test-set-status! test-id state status comment dat #!key (work-area #f))
(debug:print-info 4 "tests:test-set-status! test-id=" test-id ", state=" state ", status=" status ", dat=" dat)
(let* ((db #f)
(real-status status)
|
︙ | | |
Modified tests/Makefile
from [c07bc6a6e8]
to [602052bbdd].
︙ | | |
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
-
+
+
+
+
|
touch cleanprep
fullprep : cleanprep
cd fullrun;$(MEGATEST) -remove-runs :runname $(RUNNAME)% -target %/%/% -testpatt %/%
cd fullrun;$(BINPATH)/dashboard -rows 15 &
dashboard : cleanprep
cd fullrun && $(BINPATH)/dashboard -rows 25 &
cd fullrun && $(BINPATH)/dashboard -transport fs -rows 20 &
dashboard-http : cleanprep
cd fullrun && $(BINPATH)/dashboard -transport http -rows 20 &
remove :
cd fullrun;$(MEGATEST) -remove-runs :runname $(RUN) -testpatt % -itempatt % :sysname % :fsname % :datapath %
clean :
rm cleanprep
|
︙ | | |
Modified tests/fullrun/megatest.config
from [d93def4083]
to [4419360fc2].
︙ | | |
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
+
+
+
+
|
[tests-paths]
1 #{get misc parent}/simplerun/tests
[setup]
# Set launchwait to yes to use the old launch run code that waits for the launch process to return before
# proceeding.
# launchwait yes
# Use http instead of direct filesystem access
transport http
# If set to "default" the old code is used. Otherwise defaults to 200 or uses
# numeric value given.
#
runqueue 20
|
︙ | | |
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
synchronous OFF
# Throttle roughly scales the db access milliseconds to seconds delay
throttle 0.2
# Max retries allows megatest to re-check that a tests status has changed
# as tests can have transient FAIL status occasionally
maxretries 20
# Setup continued.
[setup]
# override the logview command
#
logviewer (%MTCMD%) 2> /dev/null > /dev/null
# override the html viewer launch command
#
# htmlviewercmd firefox -new-window
htmlviewercmd konqueror
[validvalues]
state start end 0 1 - 2
status pass fail n/a 0 1 running - 2
# These are set before all tests, override them
# in the testconfig [pre-launch-env-overrides] section
[env-override]
# MT_XTERM_CMD overrides the terminal command
# MT_XTERM_CMD xterm -bg lightgreen -fg black
SPECIAL_ENV_VARS overide them here - should be seen at launch and in the runs
TESTVAR [system echo $PWD]
DEADVAR [system ls]
VARWITHDOLLAR $HOME/.zshrc
WACKYVAR #{system ls > /dev/null}
WACKYVAR2 #{get validvalues state}
WACKYVAR3 #{getenv USER}
|
︙ | | |
Added tests/fullrun/tests/ez_fail_quick/testconfig version [76759892d8].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
[requirements]
priority 10
[ezsteps]
# should fail on next step
lookitnada ls /nada
[test_meta]
author matt
owner bob
description This test runs a single ezstep which fails immediately.
tags first,single
reviewed 09/10/2011, by Matt
|
| | | | | | | | | | | | |
Added tests/installall/config/sxml/_sheets.sxml version [8edcebe32d].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
((@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation
"http://www.gnumeric.org/v9.xsd"))
(http://www.gnumeric.org/v10.dtd:Version
(@ (Minor "17") (Major "10") (Full "1.10.17") (Epoch "1")))
(http://www.gnumeric.org/v10.dtd:Attributes
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name
"WorkbookView::show_horizontal_scrollbar")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name
"WorkbookView::show_vertical_scrollbar")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_notebook_tabs")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name "WorkbookView::do_auto_completion")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name "WorkbookView::is_protected")
(http://www.gnumeric.org/v10.dtd:value "FALSE")))
(urn:oasis:names:tc:opendocument:xmlns:office:1.0:document-meta
(@ (urn:oasis:names:tc:opendocument:xmlns:office:1.0:version "1.2"))
(urn:oasis:names:tc:opendocument:xmlns:office:1.0:meta
(http://purl.org/dc/elements/1.1/:date "2013-07-21T23:45:07Z")
(urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date
"2013-07-21T23:42:35Z")))
(http://www.gnumeric.org/v10.dtd:Calculation
(@ (MaxIterations "100")
(ManualRecalc "0")
(IterationTolerance "0.001")
(FloatRadix "2")
(FloatDigits "53")
(EnableIteration "1")))
(http://www.gnumeric.org/v10.dtd:SheetNameIndex
(http://www.gnumeric.org/v10.dtd:SheetName
(@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
(http://www.gnumeric.org/v10.dtd:Cols "256"))
"megatest.config")
(http://www.gnumeric.org/v10.dtd:SheetName
(@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
(http://www.gnumeric.org/v10.dtd:Cols "256"))
"runconfigs.config"))
(http://www.gnumeric.org/v10.dtd:Geometry (@ (Width "1440") (Height "647")))
(http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "0"))))
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added tests/installall/config/sxml/_workbook.sxml version [96ffb7f9d5].
|
1
|
+
|
(*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\""))
|
Deleted tests/installall/config/sxml/sheets.sxml version [8edcebe32d].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
((@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation
"http://www.gnumeric.org/v9.xsd"))
(http://www.gnumeric.org/v10.dtd:Version
(@ (Minor "17") (Major "10") (Full "1.10.17") (Epoch "1")))
(http://www.gnumeric.org/v10.dtd:Attributes
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name
"WorkbookView::show_horizontal_scrollbar")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name
"WorkbookView::show_vertical_scrollbar")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_notebook_tabs")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name "WorkbookView::do_auto_completion")
(http://www.gnumeric.org/v10.dtd:value "TRUE"))
(http://www.gnumeric.org/v10.dtd:Attribute
(http://www.gnumeric.org/v10.dtd:type "4")
(http://www.gnumeric.org/v10.dtd:name "WorkbookView::is_protected")
(http://www.gnumeric.org/v10.dtd:value "FALSE")))
(urn:oasis:names:tc:opendocument:xmlns:office:1.0:document-meta
(@ (urn:oasis:names:tc:opendocument:xmlns:office:1.0:version "1.2"))
(urn:oasis:names:tc:opendocument:xmlns:office:1.0:meta
(http://purl.org/dc/elements/1.1/:date "2013-07-21T23:45:07Z")
(urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date
"2013-07-21T23:42:35Z")))
(http://www.gnumeric.org/v10.dtd:Calculation
(@ (MaxIterations "100")
(ManualRecalc "0")
(IterationTolerance "0.001")
(FloatRadix "2")
(FloatDigits "53")
(EnableIteration "1")))
(http://www.gnumeric.org/v10.dtd:SheetNameIndex
(http://www.gnumeric.org/v10.dtd:SheetName
(@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
(http://www.gnumeric.org/v10.dtd:Cols "256"))
"megatest.config")
(http://www.gnumeric.org/v10.dtd:SheetName
(@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
(http://www.gnumeric.org/v10.dtd:Cols "256"))
"runconfigs.config"))
(http://www.gnumeric.org/v10.dtd:Geometry (@ (Width "1440") (Height "647")))
(http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "0"))))
|
Deleted tests/installall/config/sxml/workbook.sxml version [96ffb7f9d5].
1
|
|
-
|
(*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\""))
|
Modified tests/installall/megatest.config
from [495217020e]
to [a67193d07e].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
-
+
+
|
[fields]
CHICKEN_VERSION TEXT
MEGATEST_VERSION TEXT
IUPMODE TEXT
BUILD_TAG TEXT
[setup]
max_concurrent_jobs 4
max_concurrent_jobs 6
linktree #{getenv MT_RUN_AREA_HOME}/links
testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log
[jobtools]
useshell yes
launcher nbfind
[env-override]
EXAMPLE_VAR example value
|
︙ | | |
Modified tests/installall/runconfigs.config
from [636657cf41]
to [7b227fbb06].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
+
+
+
+
+
|
[.............]
#
# [CHICKEN_VERSION/MEGATEST_VERSION/IUPMODE/PLATFORM/BUILD_TAG]
#
[default]
ALLTESTS see this variable
PREFIX #{getenv MT_RUN_AREA_HOME}/#{getenv BUILD_TAG}/#{getenv MT_RUNNAME}
DOWNLOADS #{getenv MT_RUN_AREA_HOME}/downloads
IUPLIB 26g4
PLATFORM linux
LOGPRO_VERSION v1.05
BUILDSQLITE yes
SQLITE3_VERSION 3071401
ZEROMQ_VERSION 2.2.0
logpro_VERSION v1.08
stml_VERSION v0.901
megatest_VERSION v1.5511
[include configs/hicken-#{getenv CHICKEN_VERSION}.config]
# Currently must have at least one variable in a section
[4.8.0/trunk/bin/std]
IUP_VERSION na
[4.8.0.4/trunk/src/std]
CHICKEN_URL http://code.call-cc.org/releases/4.8.0/chicken-4.8.0.4.tar.gz
IUP_VERSION na
[4.8.1/trunk/src/std]
IUP_VERSION na
[4.8.0/v1.5508/opt]
IUP_VERSION na
PREFIX /opt/chicken/4.8.0
[4.8.0/trunk/centos5.7vm]
BUILDSQLITE no
|
|
Modified tests/installall/tests/chicken/download.sh
from [852d0f9c90]
to [ba9f4a1774].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
-
+
-
-
+
+
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
if ! [[ -e ${DOWNLOADS}/chicken-${CHICKEN_VERSION}.tar.gz ]]; then
if [ ! -e ${DOWNLOADS}/chicken-${CHICKEN_VERSION}.tar.gz ]; then
if [ "${CHICKEN_URL}" == "" ]; then
(cd ${DOWNLOADS};wget http://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz)
CHICKEN_URL=http://code.call-cc.org/releases/${CHICKEN_VERSION}/chicken-${CHICKEN_VERSION}.tar.gz
else
(cd ${DOWNLOADS};wget ${CHICKEN_URL})
fi
echo "Downloading $CHICKEN_URL"
(cd ${DOWNLOADS};wget ${CHICKEN_URL})
fi
ls -l ${DOWNLOADS}/chicken-${CHICKEN_VERSION}.tar.gz
tar xfvz ${DOWNLOADS}/chicken-${CHICKEN_VERSION}.tar.gz
ls -l chicken-${CHICKEN_VERSION}
|
Modified tests/installall/tests/eggs/testconfig
from [78c45cba36]
to [db11309e75].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
|
# Add additional steps here. Format is "stepname script"
[ezsteps]
install install.sh
# Test requirements are specified here
[requirements]
waiton chicken setup
priority 9
# Iteration for your tests are controlled by the items section
[items]
EGG_NAME matchable readline apropos base64 regex-literals format regex-case test coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt json md5 ssax sxml-serializer sxml-modifications
EGG_NAME matchable readline apropos base64 regex-literals format regex-case test coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt json md5 ssax sxml-serializer sxml-modifications salmonella sql-de-lite postgresql
# test_meta is a section for storing additional data on your test
[test_meta]
author matt
owner matt
description Download and install eggs with no significant prerequisites
tags tagone,tagtwo
|
︙ | | |
Deleted tests/installall/tests/logpro/clone.logpro version [da3117435b].
1
2
3
4
5
6
7
8
|
|
-
-
-
-
-
-
-
-
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Put description here" #/put pattern here/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
Deleted tests/installall/tests/logpro/clone.sh version [f8d37254ad].
1
2
3
4
|
|
-
-
-
-
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
|
Deleted tests/installall/tests/logpro/compile.logpro version [da3117435b].
1
2
3
4
5
6
7
8
|
|
-
-
-
-
-
-
-
-
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Put description here" #/put pattern here/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
Deleted tests/installall/tests/logpro/compile.sh version [f8d37254ad].
1
2
3
4
|
|
-
-
-
-
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
|
Deleted tests/installall/tests/logpro/install.logpro version [da3117435b].
1
2
3
4
5
6
7
8
|
|
-
-
-
-
-
-
-
-
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Put description here" #/put pattern here/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
Deleted tests/installall/tests/logpro/install.sh version [f8d37254ad].
1
2
3
4
|
|
-
-
-
-
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
|
Deleted tests/installall/tests/logpro/open.logpro version [da3117435b].
1
2
3
4
5
6
7
8
|
|
-
-
-
-
-
-
-
-
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Put description here" #/put pattern here/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
Deleted tests/installall/tests/logpro/open.sh version [f8d37254ad].
1
2
3
4
|
|
-
-
-
-
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
|
Deleted tests/installall/tests/logpro/testconfig version [0ea0a04c15].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
# Add additional steps here. Format is "stepname script"
[ezsteps]
clone clone.sh
open open.sh
compile compile.sh
install install.sh
# Test requirements are specified here
[requirements]
waiton eggs setup
# Iteration for your tests are controlled by the items section
[items]
# test_meta is a section for storing additional data on your test
[test_meta]
author matt
owner matt
description Install the logpro tool
tags tagone,tagtwo
reviewed never
|
Added tests/installall/tests/mmisc/clone.logpro version [c92957c5fd].
|
1
2
3
4
5
6
7
8
|
+
+
+
+
+
+
+
+
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Output from fossil" #/^repository:\s+/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/i)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
| | | | | | |
Added tests/installall/tests/mmisc/clone.sh version [a61e06ec47].
|
1
2
3
4
5
6
7
8
9
10
11
|
+
+
+
+
+
+
+
+
+
+
+
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
fossil clone http://www.kiatoa.com/fossils/$FSLPKG $FSLPKG.fossil
mkdir src
cd src
fossil open ../$FSLPKG.fossil --nested
fossil co ${$FSLPKG}_VERSION}
|
| | | | | | | | | |
Added tests/installall/tests/mmisc/install.logpro version [1f5310e869].
|
1
2
3
4
5
6
7
8
9
|
+
+
+
+
+
+
+
+
+
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Always get a chmod at the end of install" #/chmod.*logpro.setup-info/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in setup-error-handling" #/setup-error-handling/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/i)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
| | | | | | | |
Added tests/installall/tests/mmisc/install.sh version [6fa1a37e4b].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
cd src
if [ $FSLPKG == "logpro" ];then
chicken-install
elif [ $FSLPKG == "stml" ];then
cp install.cfg.template install.cfg
cp requirements.scm.template requirements.scm
make
make install
else
make
make install PREFIX=$PREFIX
fi
|
| | | | | | | | | | | | | | |
Added tests/installall/tests/mmisc/testconfig version [e2a1711886].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Add additional steps here. Format is "stepname script"
[ezsteps]
clone clone.sh
install install.sh
# Test requirements are specified here
[requirements]
waiton eggs setup
# Iteration for your tests are controlled by the items section
[items]
FSLPKG logpro stml megatest
# test_meta is a section for storing additional data on your test
[test_meta]
author matt
owner matt
description Install the logpro tool
tags tagone,tagtwo
reviewed never
|
| | | | | | | | | | | | | | | | | | | |
Added tests/installall/tests/opensrc/clone.logpro version [c7d0c07345].
|
1
2
3
4
5
6
7
8
|
+
+
+
+
+
+
+
+
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Output from fossil" (list #/^repository:\s+/ #/comment:/))
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/i)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
| | | | | | |
Added tests/installall/tests/opensrc/clone.sh version [3a6c7e5a01].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
parentdir=$MT_LINKTREE/$MT_TARGET/$MT_RUNNAME
lockfile $parentdir/clone.lock
if [ ! -e $parentdir/opensrc.fossil ];then
fossil clone http://www.kiatoa.com/fossils/opensrc $parentdir/opensrc.fossil
fi
if [ ! -e $parentdir/src/dbi ];then
mkdir -p $parentdir/src
(cd $parentdir/src;fossil open $parentdir/opensrc.fossil --nested)
else
(cd $parentdir/src;fossil sync;fossil co trunk;fossil status)
fi
rm -f $parentdir/clone.lock
ln -sf $parentdir/src $MT_TEST_RUN_DIR/src
|
| | | | | | | | | | | | | | | | | | | | |
Added tests/installall/tests/opensrc/install.logpro version [78dae7a202].
|
1
2
3
4
5
6
7
8
9
|
+
+
+
+
+
+
+
+
+
|
;; You should have at least one expect:required. This ensures that your process ran
(expect:required in "LogFileBody" > 0 "Always get a chmod at the end of install" #/chmod.*.setup-info/)
;; You may need ignores to suppress false error or warning hits from the later expects
;; NOTE: Order is important here!
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/)
(expect:ignore in "LogFileBody" < 99 "Ignore the word error in setup-error-handling" #/setup-error-handling/)
(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/i)
(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/i)) ;; but disallow any other errors
|
| | | | | | | |
Added tests/installall/tests/opensrc/install.sh version [0a2e83707c].
|
1
2
3
4
5
6
|
+
+
+
+
+
+
|
#!/usr/bin/env bash
# Run your step here
source $PREFIX/buildsetup.sh
cd src/$MODULE_NAME
chicken-install
|
| | | | |
Added tests/installall/tests/opensrc/testconfig version [f020005b2c].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Add additional steps here. Format is "stepname script"
[ezsteps]
clone clone.sh
install install.sh
# Test requirements are specified here
[requirements]
waiton eggs setup sqlite3
# Iteration for your tests are controlled by the items section
[items]
MODULE_NAME dbi margs qtree vcd xfig mutils
# test_meta is a section for storing additional data on your test
[test_meta]
author matt
owner matt
description Install the eggs from the opensrc fossil
tags tagone,tagtwo
reviewed never
|
| | | | | | | | | | | | | | | | | | |
Modified utils/mt_ezstep
from [bafa45892c]
to [94c507b08a].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
+
+
+
-
-
-
+
+
+
+
|
#!/bin/bash
usage="mt_ezstep stepname prevstepname command [args ...]"
if [ "$MT_CMDINFO" == "" ];then
if [ -e megatest.sh ];then
source megatest.sh
else
echo "ERROR: $0 should be run within a megatest test environment"
echo "Usage: $usage"
exit
echo "ERROR: $0 should be run within a megatest test environment"
echo "Usage: $usage"
exit
fi
fi
# Purpose: This is for the [ezsteps] secton in your testconfig file.
# DO NOT USE IN YOUR SCRIPTS!
#
# Call like this:
# mt_ezstep stepname prevstepname command ....
|
︙ | | |
66
67
68
69
70
71
72
73
74
|
70
71
72
73
74
75
76
77
78
|
-
+
|
exitstatus=2
elif [ $logprostatus -eq 1 ]; then
exitstatus=1
else
exitstatus=0
fi
$MT_MEGATEST -env2file .ezsteps/${stepname}
# $MT_MEGATEST -env2file .ezsteps/${stepname}
exit $exitstatus
|
Added utils/mt_xterm version [7cf892b486].
|
1
2
3
4
5
6
7
8
9
10
11
12
|
+
+
+
+
+
+
+
+
+
+
+
+
|
#!/bin/bash
if [ -e megatest.sh ];then
source megatest.sh
fi
if [ x"$MT_XTERM_CMD" == "x" ];then
exec xterm "$@"
else
exec $MT_XTERM_CMD
fi
|
| | | | | | | | | | |