252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
;; populate the areadat tests info, does NOT fill the tests data itself unless asked
;;
(define (areadb:populate-run-info areadat)
(let* ((runs (or (areadat-runs areadat) (make-hash-table)))
(keys (areadat-run-keys areadat))
(maindb (areadb:open areadat 0)))
(query (for-each-row (lambda (row)
(let ((id (list-ref row 0))
(dat (apply make-rundat (append row (list #f #f))))) ;; add placeholders for tests and db
(print row)
(hash-table-set! runs id dat))))
(sql maindb (conc "SELECT id,"
(string-intersperse keys "||'/'||")
",runname,state,status,event_time FROM runs WHERE state != 'deleted';")))
areadat))
;; given an areadat and target/runname patt fill up runs data
;;
;; ?????/
;; given a list of run-ids refresh/retrieve runs data into areadat
|
>
|
|
|
|
|
|
|
|
>
|
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
;; populate the areadat tests info, does NOT fill the tests data itself unless asked
;;
(define (areadb:populate-run-info areadat)
(let* ((runs (or (areadat-runs areadat) (make-hash-table)))
(keys (areadat-run-keys areadat))
(maindb (areadb:open areadat 0)))
(if maindb
(query (for-each-row (lambda (row)
(let ((id (list-ref row 0))
(dat (apply make-rundat (append row (list #f #f))))) ;; add placeholders for tests and db
(print row)
(hash-table-set! runs id dat))))
(sql maindb (conc "SELECT id,"
(string-intersperse keys "||'/'||")
",runname,state,status,event_time FROM runs WHERE state != 'deleted';")))
(debug:print 0 "ERROR: no main.db found at " (areadb:dbfile-path areadat 0)))
areadat))
;; given an areadat and target/runname patt fill up runs data
;;
;; ?????/
;; given a list of run-ids refresh/retrieve runs data into areadat
|
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
(rows (tab-rows tab-dat))
(used-cols (hash-table-values headers))
(used-rows (hash-table-values rows))
(touched (make-hash-table)) ;; (vector row col) ==> true, touched cell
(view-type (dboard:get-view-type keys current-path))
(changed #f)
(state-statuses (list "PASS" "FAIL" "WARN" "CHECK" "SKIP" "RUNNING" "LAUNCHED")))
(debug:print 0 "current-matrix=" current-matrix)
(case view-type
((areas) ;; find row for this area, if not found, create new entry
(let* ((curr-rownum (hash-table-ref/default rows area-name #f))
(next-rownum (+ (apply max (cons 0 used-rows)) 1))
(rownum (or curr-rownum next-rownum))
(coord (conc rownum ":0")))
(if (not curr-rownum)(hash-table-set! rows area-name rownum))
|
|
|
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
|
(rows (tab-rows tab-dat))
(used-cols (hash-table-values headers))
(used-rows (hash-table-values rows))
(touched (make-hash-table)) ;; (vector row col) ==> true, touched cell
(view-type (dboard:get-view-type keys current-path))
(changed #f)
(state-statuses (list "PASS" "FAIL" "WARN" "CHECK" "SKIP" "RUNNING" "LAUNCHED")))
;; (debug:print 0 "current-matrix=" current-matrix)
(case view-type
((areas) ;; find row for this area, if not found, create new entry
(let* ((curr-rownum (hash-table-ref/default rows area-name #f))
(next-rownum (+ (apply max (cons 0 used-rows)) 1))
(rownum (or curr-rownum next-rownum))
(coord (conc rownum ":0")))
(if (not curr-rownum)(hash-table-set! rows area-name rownum))
|