550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
(define (rmt:get-test-id run-id testname item-path)
(rmt:send-receive 'get-test-id run-id (list run-id testname item-path)))
;; run-id is NOT used - but it will be!
;;
(define (rmt:get-test-info-by-id run-id test-id)
(if (number? test-id)
(let* ((testdat (rmt:send-receive 'get-test-info-by-id run-id (list run-id test-id)))
(trundir (vector-ref testdat 10))
(trundatf (conc trundir"/.mt_data/test-run.dat")))
;; now we can update a couple fields from the filesystem
(handle-exceptions
exn
(begin
(debug:print-info 0 *default-log-port* "Could not update testdat record from "trundatf", exn=" exn)
#f)
(if (and trundir
(file-exists? trundatf))
(let* ((duration (vector-ref testdat 12)) ;; (db:test-get-run_duration testdat))
(event-time (vector-ref testdat 5)) ;; (db:test-get-event_time testdat))
(last-touch (file-modification-time trundatf))
(new-duration (max duration (- last-touch event-time))))
(vector-set! testdat 12 new-duration))))
#;(db:test-set-run_duration! testdat (max duration (- last-touch event-time)))
testdat)
(begin
(debug:print 0 *default-log-port* "WARNING: Bad data handed to rmt:get-test-info-by-id run-id=" run-id ", test-id=" test-id)
(print-call-chain (current-error-port))
#f)))
(define (rmt:test-get-rundir-from-test-id run-id test-id)
(rmt:send-receive 'test-get-rundir-from-test-id run-id (list run-id test-id)))
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
|
(define (rmt:get-test-id run-id testname item-path)
(rmt:send-receive 'get-test-id run-id (list run-id testname item-path)))
;; run-id is NOT used - but it will be!
;;
(define (rmt:get-test-info-by-id run-id test-id)
(if (number? test-id)
(rmt:send-receive 'get-test-info-by-id run-id (list run-id test-id))
(begin
(debug:print 0 *default-log-port* "WARNING: Bad data handed to rmt:get-test-info-by-id run-id=" run-id ", test-id=" test-id)
(print-call-chain (current-error-port))
#f)))
(define (rmt:test-get-rundir-from-test-id run-id test-id)
(rmt:send-receive 'test-get-rundir-from-test-id run-id (list run-id test-id)))
|