645
646
647
648
649
650
651
652
653
654
655
656
657
658
|
(lambda (id test-id stepname state status event-time)
(set! res (cons (vector id test-id stepname state status event-time) res)))
db
"SELECT id,test_id,stepname,state,status,event_time FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC;
test-id)
(reverse res)))
;; get a pretty table to summarize steps
;;
(define (db:get-steps-table db test-id)
(let ((steps (db:get-steps-for-test db test-id)))
;; organise the steps for better readability
(let ((res (make-hash-table)))
(for-each
|
>
>
>
>
>
>
>
>
|
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
|
(lambda (id test-id stepname state status event-time)
(set! res (cons (vector id test-id stepname state status event-time) res)))
db
"SELECT id,test_id,stepname,state,status,event_time FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC;
test-id)
(reverse res)))
;;
(define (make-db:steps-table)(make-vector 5))
(define-inline (db:steps-table-get-stepname vec) (vector-ref vec 0))
(define-inline (db:steps-table-get-start vec) (vector-ref vec 1))
(define-inline (db:steps-table-get-end vec) (vector-ref vec 2))
(define-inline (db:steps-table-get-status vec) (vector-ref vec 3))
(define-inline (db:steps-table-get-runtime vec) (vector-ref vec 4))
;; get a pretty table to summarize steps
;;
(define (db:get-steps-table db test-id)
(let ((steps (db:get-steps-for-test db test-id)))
;; organise the steps for better readability
(let ((res (make-hash-table)))
(for-each
|