268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
(exit 1))
(let* ((run-id (if testdat (db:test-get-run_id testdat) #f))
(keydat (if testdat (open-run-close db:get-key-val-pairs #f run-id) #f))
(rundat (if testdat (open-run-close db:get-run-info #f run-id) #f))
(runname (if testdat (db:get-value-by-header (db:get-row rundat)
(db:get-header rundat)
"runname") #f))
(teststeps (if testdat (db:get-compressed-steps test-id) '()))
(logfile "/this/dir/better/not/exist")
(rundir logfile)
(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)))
|
<
>
|
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
(exit 1))
(let* ((run-id (if testdat (db:test-get-run_id testdat) #f))
(keydat (if testdat (open-run-close db:get-key-val-pairs #f run-id) #f))
(rundat (if testdat (open-run-close db:get-run-info #f run-id) #f))
(runname (if testdat (db:get-value-by-header (db:get-row rundat)
(db:get-header rundat)
"runname") #f))
(logfile "/this/dir/better/not/exist")
(rundir logfile)
(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)))
|
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&")))
(message-window (conc "Directory " rundir " not found")))))
(refreshdat (lambda ()
(let* ((curr-mod-time (file-modification-time db-path))
(need-update (or (and (> curr-mod-time db-mod-time)
(> (current-seconds) (+ last-update 2))) ;; every two seconds if db touched
request-update))
(newtestdat (if need-update (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))
(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 "))
)
(need-update ;; if this was true and yet there is no data ....
(db:test-set-testname! testdat "DEAD OR DELETED TEST"))))))
|
|
>
>
>
>
|
|
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&")))
(message-window (conc "Directory " rundir " not found")))))
(refreshdat (lambda ()
(let* ((curr-mod-time (file-modification-time db-path))
(need-update (or (and (> curr-mod-time db-mod-time)
(> (current-seconds) (+ last-update 2))) ;; every two seconds if db touched
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 "))
)
(need-update ;; if this was true and yet there is no data ....
(db:test-set-testname! testdat "DEAD OR DELETED TEST"))))))
|