︙ | | | ︙ | |
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
|
please-update: #t
update-mutex: (make-mutex)
updaters: (make-hash-table)
updating: #f
hide-not-hide-tabs: #f
))
(define (dboard:common-get-tabdat commondat #!key (tab-num #f))
(hash-table-ref/default
(dboard:commondat-tabdats commondat)
(or tab-num (dboard:commondat-curr-tab-num commondat))
#f))
(define (dboard:common-set-tabdat! commondat tabnum tabdat)
(hash-table-set!
(dboard:commondat-tabdats commondat)
tabnum
tabdat))
;; gets and calls updater based on curr-tab-num
(define (dboard:common-run-curr-updaters commondat #!key (tab-num #f))
(if (dboard:common-get-tabdat commondat tab-num: tab-num) ;; only update if there is a tabdat
(let* ((tnum (or tab-num (dboard:commondat-curr-tab-num commondat)))
(updaters (hash-table-ref/default (dboard:commondat-updaters commondat)
tnum
'())))
(debug:print 4 *default-log-port* "Found these updaters: " updaters " for tab-num: " tnum)
(for-each
(lambda (updater)
;; (debug:print 3 *default-log-port* "Running " updater)
(updater))
updaters))))
;; if tab-num passed in then use it, otherwise look in commondat at curr-tab-num
;;
(define (dboard:commondat-add-updater commondat updater #!key (tab-num #f))
(let* ((tnum (or tab-num
(dboard:commondat-curr-tab-num commondat)))
(curr-updaters (hash-table-ref/default (dboard:commondat-updaters commondat) tnum '())))
(hash-table-set! (dboard:commondat-updaters commondat)
tnum
|
>
>
|
>
>
|
|
>
|
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
|
please-update: #t
update-mutex: (make-mutex)
updaters: (make-hash-table)
updating: #f
hide-not-hide-tabs: #f
))
;; RA => returns the tabdat stored at hashkey passed in commondat-tabdats table (e.g. 0 gives summary)
;;
(define (dboard:common-get-tabdat commondat #!key (tab-num #f))
(hash-table-ref/default
(dboard:commondat-tabdats commondat)
(or tab-num (dboard:commondat-curr-tab-num commondat)) ;; tab-num value is curr-tab-num value in passed commondat
#f))
;; RA => sets the tabdat passed to the hashkey at commondat:tabdats hash table
;;
(define (dboard:common-set-tabdat! commondat tabnum tabdat)
(hash-table-set!
(dboard:commondat-tabdats commondat)
tabnum
tabdat))
;; gets and calls updater list based on curr-tab-num
(define (dboard:common-run-curr-updaters commondat #!key (tab-num #f))
(if (dboard:common-get-tabdat commondat tab-num: tab-num) ;; only update if there is a tabdat
(let* ((tnum (or tab-num (dboard:commondat-curr-tab-num commondat)))
(updaters (hash-table-ref/default (dboard:commondat-updaters commondat)
tnum
'())))
(debug:print 4 *default-log-port* "Found these updaters: " updaters " for tab-num: " tnum)
(for-each ;; perform the function calls for the complete updaters list
(lambda (updater)
;; (debug:print 3 *default-log-port* "Running " updater)
(updater))
updaters))))
;; if tab-num passed in then use it, otherwise look in commondat at curr-tab-num
;; adds the updater passed in the updaters list at that hashkey
;;
(define (dboard:commondat-add-updater commondat updater #!key (tab-num #f))
(let* ((tnum (or tab-num
(dboard:commondat-curr-tab-num commondat)))
(curr-updaters (hash-table-ref/default (dboard:commondat-updaters commondat) tnum '())))
(hash-table-set! (dboard:commondat-updaters commondat)
tnum
|
︙ | | | ︙ | |
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
((max-row 0) : number)
((running-layout #f) : boolean)
(originx #f)
(originy #f)
((layout-update-ok #t) : boolean)
((compact-layout #t) : boolean)
;; Controls used to launch runs etc.
((command "") : string) ;; for run control this is the command being built up
(command-tb #f)
(key-listboxes #f)
(key-lbs #f)
run-name ;; from run name setting widget
states ;; states for -state s1,s2 ...
|
>
>
>
>
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
((max-row 0) : number)
((running-layout #f) : boolean)
(originx #f)
(originy #f)
((layout-update-ok #t) : boolean)
((compact-layout #t) : boolean)
;; Run times layout
(graph-button-box #f)
((graph-button-dat (make-hash-table)) : hash-table) ;;RA=> Contains all the button ids mapped to field id
;; Controls used to launch runs etc.
((command "") : string) ;; for run control this is the command being built up
(command-tb #f)
(key-listboxes #f)
(key-lbs #f)
run-name ;; from run name setting widget
states ;; states for -state s1,s2 ...
|
︙ | | | ︙ | |
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
((path-run-ids (make-hash-table)) : hash-table) ;; path (target / runname) => id
(runs-tree #f)
;; tab data
((view-changed #t) : boolean)
((xadj 0) : number) ;; x slider number (if using canvas)
((yadj 0) : number) ;; y slider number (if using canvas)
tests-tree ;; used in newdashboard
)
(define (dboard:tabdat-target-string vec)
(let ((targ (dboard:tabdat-target vec)))
(if (list? targ)(string-intersperse targ "/") "no-target-specified")))
|
<
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
((path-run-ids (make-hash-table)) : hash-table) ;; path (target / runname) => id
(runs-tree #f)
;; tab data
((view-changed #t) : boolean)
((xadj 0) : number) ;; x slider number (if using canvas)
((yadj 0) : number) ;; y slider number (if using canvas)
tests-tree ;; used in newdashboard
)
(define (dboard:tabdat-target-string vec)
(let ((targ (dboard:tabdat-target vec)))
(if (list? targ)(string-intersperse targ "/") "no-target-specified")))
|
︙ | | | ︙ | |
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
(take-right (dboard:tabdat-allruns tabdat) numruns)
(pad-list (dboard:tabdat-allruns tabdat) numruns)))
(lftcol (dboard:uidat-get-lftcol uidat))
(tableheader (dboard:uidat-get-header uidat))
(table (dboard:uidat-get-runsvec uidat))
(coln 0)
(all-test-names (make-hash-table)))
;; create a concise list of test names
;;
(for-each
(lambda (rundat)
(if rundat
(let* ((testdats (dboard:rundat-tests rundat))
(testnames (map test:test-get-fullname (hash-table-values testdats))))
|
<
|
796
797
798
799
800
801
802
803
804
805
806
807
808
809
|
(take-right (dboard:tabdat-allruns tabdat) numruns)
(pad-list (dboard:tabdat-allruns tabdat) numruns)))
(lftcol (dboard:uidat-get-lftcol uidat))
(tableheader (dboard:uidat-get-header uidat))
(table (dboard:uidat-get-runsvec uidat))
(coln 0)
(all-test-names (make-hash-table)))
;; create a concise list of test names
;;
(for-each
(lambda (rundat)
(if rundat
(let* ((testdats (dboard:rundat-tests rundat))
(testnames (map test:test-get-fullname (hash-table-values testdats))))
|
︙ | | | ︙ | |
890
891
892
893
894
895
896
897
898
899
900
901
902
903
|
(color (car (gutils:get-color-for-state-status teststate teststatus)))
(curr-color (vector-ref buttondat 1)) ;; (iup:attribute button "BGCOLOR"))
(curr-title (vector-ref buttondat 2))) ;; (iup:attribute button "TITLE")))
(if (not (equal? curr-color color))
(iup:attribute-set! button "BGCOLOR" color))
(if (not (equal? curr-title buttontxt))
(iup:attribute-set! button "TITLE" buttontxt))
(vector-set! buttondat 0 run-id)
(vector-set! buttondat 1 color)
(vector-set! buttondat 2 buttontxt)
(vector-set! buttondat 3 testdat)
(vector-set! buttondat 4 run-key)))
(set! rown (+ rown 1))))
(dboard:tabdat-all-test-names tabdat)))
|
>
|
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
|
(color (car (gutils:get-color-for-state-status teststate teststatus)))
(curr-color (vector-ref buttondat 1)) ;; (iup:attribute button "BGCOLOR"))
(curr-title (vector-ref buttondat 2))) ;; (iup:attribute button "TITLE")))
(if (not (equal? curr-color color))
(iup:attribute-set! button "BGCOLOR" color))
(if (not (equal? curr-title buttontxt))
(iup:attribute-set! button "TITLE" buttontxt))
;;(print "RA => testdat " testdat " teststate " teststate " teststatus " teststatus " buttondat " buttondat " curr-color " curr-color " curr-title " curr-title "buttontxt" buttontxt " title " curr-title )
(vector-set! buttondat 0 run-id)
(vector-set! buttondat 1 color)
(vector-set! buttondat 2 buttontxt)
(vector-set! buttondat 3 testdat)
(vector-set! buttondat 4 run-key)))
(set! rown (+ rown 1))))
(dboard:tabdat-all-test-names tabdat)))
|
︙ | | | ︙ | |
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
|
(vg:drawing-scalex-set! drawing
(+ scalex
(if (> step 0)
(* scalex 0.02)
(* scalex -0.02))))))
"wheel-cb"))
)))
cnv-obj)))))
;;======================================================================
;; R U N
;;======================================================================
;;
;; display and manage a single run at a time
|
|
>
>
>
>
>
>
>
>
>
>
|
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
|
(vg:drawing-scalex-set! drawing
(+ scalex
(if (> step 0)
(* scalex 0.02)
(* scalex -0.02))))))
"wheel-cb"))
)))
cnv-obj)
(let* ((hb1 (iup:hbox))
(buttondat (dboard:tabdat-graph-button-dat tabdat)))
;; (b1 (iup:button "testbutton")))
(dboard:tabdat-graph-button-box-set! tabdat hb1)
(for-each
(lambda (buttondat)
(let* ((b1 (iup:button "buttondat-graph-name")))
(iup:child-add! b1 hb1))))
hb1)
))))
;;======================================================================
;; R U N
;;======================================================================
;;
;; display and manage a single run at a time
|
︙ | | | ︙ | |
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
|
#:click-cb
(lambda (obj lin col status)
(let* ((toolpath (car (argv)))
(key (conc lin ":" col))
(test-id (hash-table-ref/default cell-lookup key -1))
(cmd (conc toolpath " -test " (dboard:tabdat-curr-run-id tabdat) "," test-id "&")))
(system cmd)))))
(one-run-updater
(lambda ()
(mutex-lock! update-mutex)
(if (or (dashboard:database-changed? commondat tabdat)
(dboard:tabdat-view-changed tabdat))
(debug:catch-and-dump
(lambda () ;; check that run-matrix is initialized before calling the updater
(if run-matrix
|
|
|
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
|
#:click-cb
(lambda (obj lin col status)
(let* ((toolpath (car (argv)))
(key (conc lin ":" col))
(test-id (hash-table-ref/default cell-lookup key -1))
(cmd (conc toolpath " -test " (dboard:tabdat-curr-run-id tabdat) "," test-id "&")))
(system cmd)))))
(one-run-updater ;; RA => Prework done to ensure runs set before calling one-run-updater
(lambda ()
(mutex-lock! update-mutex)
(if (or (dashboard:database-changed? commondat tabdat)
(dboard:tabdat-view-changed tabdat))
(debug:catch-and-dump
(lambda () ;; check that run-matrix is initialized before calling the updater
(if run-matrix
|
︙ | | | ︙ | |
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
|
(iup:menu-item
"Run"
(iup:menu
(iup:menu-item
(conc "Rerun " testpatt)
#:action
(lambda (obj)
;;(print "buttndat: " buttndat " run-id: " run-id " test-id: " test-id " target: " target " runname: " runname " test-name: " test-name " testpatt: " testpatt)
(common:run-a-command
(conc "megatest -run -target " target
" -runname " runname
" -testpatt " testpatt
" -preclean -clean-cache")
)))
(iup:menu-item
|
|
|
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
|
(iup:menu-item
"Run"
(iup:menu
(iup:menu-item
(conc "Rerun " testpatt)
#:action
(lambda (obj)
;; (print "buttndat: " buttndat " run-id: " run-id " test-id: " test-id " target: " target " runname: " runname " test-name: " test-name " testpatt: " testpatt)
(common:run-a-command
(conc "megatest -run -target " target
" -runname " runname
" -testpatt " testpatt
" -preclean -clean-cache")
)))
(iup:menu-item
|
︙ | | | ︙ | |
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
|
(iup:menu-item
"Clean Complete Run"
#:action
(lambda (obj)
(common:run-a-command
(conc "megatest -remove-runs -target " target
" -runname " runname
" -testpatt % "))))))
(iup:menu-item
"Test"
(iup:menu
(iup:menu-item
(conc "Rerun " test-name)
#:action
(lambda (obj)
|
|
>
>
>
>
>
>
>
>
>
|
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
|
(iup:menu-item
"Clean Complete Run"
#:action
(lambda (obj)
(common:run-a-command
(conc "megatest -remove-runs -target " target
" -runname " runname
" -testpatt % "))))
(iup:menu-item ;; RADT => itemize this run lists before merging with v1.61
"Kill Complete Run"
#:action
(lambda (obj)
(common:run-a-command
(conc "megatest -set-state-status KILLREQ,n/a -target " target
" -runname " runname
" -testpatt % "
" -state RUNNING,REMOTEHOSTSTART,LAUNCHED"))))))
(iup:menu-item
"Test"
(iup:menu
(iup:menu-item
(conc "Rerun " test-name)
#:action
(lambda (obj)
|
︙ | | | ︙ | |
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
|
" " tconfig " &")))
(system cmd))))
))))
(define (make-dashboard-buttons commondat) ;; runs-sum-dat new-view-dat)
(let* ((stats-dat (dboard:tabdat-make-data))
(runs-dat (dboard:tabdat-make-data))
(onerun-dat (dboard:tabdat-make-data))
(runcontrols-dat (dboard:tabdat-make-data))
(runtimes-dat (dboard:tabdat-make-data))
(nruns (dboard:tabdat-numruns runs-dat))
(ntests (dboard:tabdat-num-tests runs-dat))
(keynames (dboard:tabdat-dbkeys runs-dat))
(nkeys (length keynames))
(runsvec (make-vector nruns))
|
|
|
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
|
" " tconfig " &")))
(system cmd))))
))))
(define (make-dashboard-buttons commondat) ;; runs-sum-dat new-view-dat)
(let* ((stats-dat (dboard:tabdat-make-data))
(runs-dat (dboard:tabdat-make-data))
(onerun-dat (dboard:tabdat-make-data)) ;; name for run-summary structure
(runcontrols-dat (dboard:tabdat-make-data))
(runtimes-dat (dboard:tabdat-make-data))
(nruns (dboard:tabdat-numruns runs-dat))
(ntests (dboard:tabdat-num-tests runs-dat))
(keynames (dboard:tabdat-dbkeys runs-dat))
(nkeys (length keynames))
(runsvec (make-vector nruns))
|
︙ | | | ︙ | |
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
|
recalc))
;; point inside line
;;
(define-inline (dashboard:px-between px lx1 lx2)
(and (< lx1 px)(> lx2 px)))
;; can a bar be placed in row "rownum" covering x1 to x2 without overlapping with existing
;; bars? Use num-rows to check that a block will fit from rownum to (+ rownum num-rows)
;;
(define (dashboard:row-collision rowhash rownum x1 x2 #!key (num-rows #f))
(let ((lastrow (if num-rows (+ rownum num-rows) rownum)))
(let loop ((i 0)
(rowdat (hash-table-ref/default rowhash rownum '())))
|
>
>
|
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
|
recalc))
;; point inside line
;;
(define-inline (dashboard:px-between px lx1 lx2)
(and (< lx1 px)(> lx2 px)))
;;Not reference anywhere
;;
;; can a bar be placed in row "rownum" covering x1 to x2 without overlapping with existing
;; bars? Use num-rows to check that a block will fit from rownum to (+ rownum num-rows)
;;
(define (dashboard:row-collision rowhash rownum x1 x2 #!key (num-rows #f))
(let ((lastrow (if num-rows (+ rownum num-rows) rownum)))
(let loop ((i 0)
(rowdat (hash-table-ref/default rowhash rownum '())))
|
︙ | | | ︙ | |
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
|
fieldname
(cons
(apply vector tstart (cdr zeropt))
(hash-table-ref/default res-ht fieldname '())))))))
fields)
res-ht)
#f)))))
;; graph data
;; tsc=timescale, tfn=function; time->x
;;
(define (dboard:graph commondat tabdat tabnum llx lly ulx uly tstart tend tsc tfn compname cmargin)
(let* ((dwg (dboard:tabdat-drawing tabdat))
(lib (vg:get/create-lib dwg "runslib"))
(cnv (dboard:tabdat-cnv tabdat))
|
|
|
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
|
fieldname
(cons
(apply vector tstart (cdr zeropt))
(hash-table-ref/default res-ht fieldname '())))))))
fields)
res-ht)
#f)))))
;; graph data
;; tsc=timescale, tfn=function; time->x
;;
(define (dboard:graph commondat tabdat tabnum llx lly ulx uly tstart tend tsc tfn compname cmargin)
(let* ((dwg (dboard:tabdat-drawing tabdat))
(lib (vg:get/create-lib dwg "runslib"))
(cnv (dboard:tabdat-cnv tabdat))
|
︙ | | | ︙ | |
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
|
(vg:make-text-obj (- smark 1)(- lly 10) label))))
(if (< mark (- tend time-blk))
(loop (+ mark time-blk)(+ count 1))))))
(for-each
(lambda (cf)
(let* ((alldat (dboard:graph-read-data (cadr cf) tstart tend)))
(if alldat
(for-each
(lambda (fieldn)
(let* ((dat (hash-table-ref alldat fieldn))
(vals (map (lambda (x)(vector-ref x 2)) dat)))
(if (not (null? vals))
(let* ((maxval (apply max vals))
(minval (min 0 (apply min vals)))
(yoff (- minval lly)) ;; minval))
(deltaval (- maxval minval))
(yscale (/ delta-y (if (zero? deltaval) 1 deltaval)))
(yfunc (lambda (y)(+ lly (* yscale (- y minval))))) ;; (lambda (y)(* (+ y yoff) yscale))))
|
>
|
>
>
|
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
|
(vg:make-text-obj (- smark 1)(- lly 10) label))))
(if (< mark (- tend time-blk))
(loop (+ mark time-blk)(+ count 1))))))
(for-each
(lambda (cf)
(let* ((alldat (dboard:graph-read-data (cadr cf) tstart tend)))
(if alldat
;; RA => generate canvas
(for-each
(lambda (fieldn)
(let* ((dat (hash-table-ref alldat fieldn))
(vals (map (lambda (x)(vector-ref x 2)) dat))
(buttondat (tabdat-graph-button-dat)))
;; Check if the dat is already added in the buttondat table; if not add it
(if (not (null? vals))
(let* ((maxval (apply max vals))
(minval (min 0 (apply min vals)))
(yoff (- minval lly)) ;; minval))
(deltaval (- maxval minval))
(yscale (/ delta-y (if (zero? deltaval) 1 deltaval)))
(yfunc (lambda (y)(+ lly (* yscale (- y minval))))) ;; (lambda (y)(* (+ y yoff) yscale))))
|
︙ | | | ︙ | |
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
|
(if (dboard:tabdat-layout-update-ok tabdat)
(runloop (car runtal)(cdr runtal) (+ run-num 1) newdoneruns)
(escapeloop #t) ;; (dboard:tabdat-layout-update-ok tabdat)
))))))))) ;; new-run-start-row
)))
(debug:print 2 *default-log-port* "no tabdat for run-times-tab-updater"))))
(define (dashboard:runs-tab-updater commondat tab-num)
(debug:catch-and-dump
(lambda ()
(let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num))
(dbkeys (dboard:tabdat-dbkeys tabdat)))
(update-rundat tabdat
(hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%")
(dboard:tabdat-numruns tabdat)
(hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%")
(let* ((dbkeys (dboard:tabdat-dbkeys tabdat)))
;; (print "dbkeys: " dbkeys)
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
|
(if (dboard:tabdat-layout-update-ok tabdat)
(runloop (car runtal)(cdr runtal) (+ run-num 1) newdoneruns)
(escapeloop #t) ;; (dboard:tabdat-layout-update-ok tabdat)
))))))))) ;; new-run-start-row
)))
(debug:print 2 *default-log-port* "no tabdat for run-times-tab-updater"))))
(define (tabdat-values tabdat)
(let ((allruns (dboard:tabdat-allruns tabdat))
(allruns-by-id (dboard:tabdat-allruns-by-id tabdat))
(done-runs (dboard:tabdat-done-runs tabdat))
(not-done-runs (dboard:tabdat-not-done-runs tabdat))
(header (dboard:tabdat-header tabdat))
(keys (dboard:tabdat-keys tabdat))
(numruns (dboard:tabdat-numruns tabdat))
(tot-runs (dboard:tabdat-tot-runs tabdat))
(last-data-update (dboard:tabdat-last-data-update tabdat))
(runs-mutex (dboard:tabdat-runs-mutex tabdat))
(run-update-times (dboard:tabdat-run-update-times tabdat))
(last-test-dat (dboard:tabdat-last-test-dat tabdat))
(run-db-paths (dboard:tabdat-run-db-paths tabdat))
(buttondat (dboard:tabdat-buttondat tabdat))
(item-test-names (dboard:tabdat-item-test-names tabdat))
(run-keys (dboard:tabdat-run-keys tabdat))
(start-run-offset (dboard:tabdat-start-run-offset tabdat))
(start-test-offset (dboard:tabdat-start-test-offset tabdat))
(runs-btn-height (dboard:tabdat-runs-btn-height tabdat))
(all-test-names (dboard:tabdat-all-test-names tabdat))
(cnv (dboard:tabdat-cnv tabdat))
(command (dboard:tabdat-command tabdat))
(run-name (dboard:tabdat-run-name tabdat))
(states (dboard:tabdat-states tabdat))
(statuses (dboard:tabdat-statuses tabdat))
(curr-run-id (dboard:tabdat-curr-run-id tabdat))
(curr-test-ids (dboard:tabdat-curr-test-ids tabdat))
(state-ignore-hash (dboard:tabdat-state-ignore-hash tabdat))
(test-patts (dboard:tabdat-test-patts tabdat))
(target (dboard:tabdat-target tabdat))
(dbdir (dboard:tabdat-dbdir tabdat))
(monitor-db-path (dboard:tabdat-monitor-db-path tabdat))
(path-run-ids (dboard:tabdat-path-run-ids tabdat)))
(print "allruns is : " allruns)
(print "allruns-by-id is : " allruns-by-id)
(print "done-runs is : " done-runs)
(print "not-done-runs is : " not-done-runs)
(print "header is : " header )
(print "keys is : " keys)
(print "numruns is : " numruns)
(print "tot-runs is : " tot-runs)
(print "last-data-update is : " last-data-update)
(print "runs-mutex is : " runs-mutex)
(print "run-update-times is : " run-update-times)
(print "last-test-dat is : " last-test-dat)
(print "run-db-paths is : " run-db-paths)
(print "buttondat is : " buttondat)
(print "item-test-names is : " item-test-names)
(print "run-keys is : " run-keys)
(print "start-run-offset is : " start-run-offset)
(print "start-test-offset is : " start-test-offset)
(print "runs-btn-height is : " runs-btn-height)
(print "all-test-names is : " all-test-names)
(print "cnv is : " cnv)
(print "command is : " command)
(print "run-name is : " run-name)
(print "states is : " states)
(print "statuses is : " statuses)
(print "curr-run-id is : " curr-run-id)
(print "curr-test-ids is : " curr-test-ids)
(print "state-ignore-hash is : " state-ignore-hash)
(print "test-patts is : " test-patts)
(print "target is : " target)
(print "dbdir is : " dbdir)
(print "monitor-db-path is : " monitor-db-path)
(print "path-run-ids is : " path-run-ids)))
(define (dashboard:runs-tab-updater commondat tab-num)
(debug:catch-and-dump
(lambda ()
(let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num))
(dbkeys (dboard:tabdat-dbkeys tabdat)))
;;(print "RA => calling runs-tab-updater with commondat " commondat " tab-num " tab-num)
;;(tabdat-values tabdat) ;;RA added
(update-rundat tabdat
(hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%")
(dboard:tabdat-numruns tabdat)
(hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%")
(let* ((dbkeys (dboard:tabdat-dbkeys tabdat)))
;; (print "dbkeys: " dbkeys)
|
︙ | | | ︙ | |
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
|
(let ((val (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) key #f)))
(if val (set! res (cons (list key val) res))))))
dbkeys)
res))))
;; (debug:print 0 *default-log-port* "fres: " fres)
fres)))
(let ((uidat (dboard:commondat-uidat commondat)))
(update-buttons tabdat uidat (dboard:tabdat-numruns tabdat) (dboard:tabdat-num-tests tabdat)))
))
"dashboard:runs-tab-updater"))
;; ((2)
;; (dashboard:update-run-summary-tab))
;; ((3)
|
>
|
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
|
(let ((val (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) key #f)))
(if val (set! res (cons (list key val) res))))))
dbkeys)
res))))
;; (debug:print 0 *default-log-port* "fres: " fres)
fres)))
(let ((uidat (dboard:commondat-uidat commondat)))
;;(print "RA => Calling update-buttons with tabdat : " tabdat " uidat " uidat)
(update-buttons tabdat uidat (dboard:tabdat-numruns tabdat) (dboard:tabdat-num-tests tabdat)))
))
"dashboard:runs-tab-updater"))
;; ((2)
;; (dashboard:update-run-summary-tab))
;; ((3)
|
︙ | | | ︙ | |
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
|
(define (main)
(if (not (args:get-arg "-skip-version-check"))(common:exit-on-version-changed))
(let* ((commondat (dboard:commondat-make)))
;; Move this stuff to db.scm? I'm not sure that is the right thing to do...
(cond
((args:get-arg "-test") ;; run-id,test-id
(let* ((dat (let ((d (map string->number (string-split (args:get-arg "-test") ","))))
(if (> (length d) 1)
d
(list #f #f))))
(run-id (car dat))
(test-id (cadr dat)))
(if (and (number? run-id)
(number? test-id)
(>= test-id 0))
(examine-test run-id test-id)
(begin
(debug:print 3 *default-log-port* "INFO: tried to open test with invalid run-id,test-id. " (args:get-arg "-test"))
(exit 1)))))
;; ((args:get-arg "-guimonitor")
;; (gui-monitor (dboard:tabdat-dblocal tabdat)))
(else
(dboard:commondat-uidat-set! commondat (make-dashboard-buttons commondat)) ;; (dboard:tabdat-dblocal data)
|
|
|
|
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
|
(define (main)
(if (not (args:get-arg "-skip-version-check"))(common:exit-on-version-changed))
(let* ((commondat (dboard:commondat-make)))
;; Move this stuff to db.scm? I'm not sure that is the right thing to do...
(cond
((args:get-arg "-test") ;; run-id,test-id
(let* ((dat (let ((d (map string->number (string-split (args:get-arg "-test") ",")))) ;; RADT couldn't find string->number, though it works
(if (> (length d) 1)
d
(list #f #f))))
(run-id (car dat))
(test-id (cadr dat)))
(if (and (number? run-id)
(number? test-id)
(>= test-id 0))
(dashboard-tests:examine-test run-id test-id)
(begin
(debug:print 3 *default-log-port* "INFO: tried to open test with invalid run-id,test-id. " (args:get-arg "-test"))
(exit 1)))))
;; ((args:get-arg "-guimonitor")
;; (gui-monitor (dboard:tabdat-dblocal tabdat)))
(else
(dboard:commondat-uidat-set! commondat (make-dashboard-buttons commondat)) ;; (dboard:tabdat-dblocal data)
|
︙ | | | ︙ | |