880
881
882
883
884
885
886
887
888
889
890
891
892
893
|
;;
(define (db:test-set-rundir! db run-id test-name item-path rundir)
(sqlite3:execute
db
"UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;"
rundir run-id test-name item-path))
;;
(define (db:test-get-rundir-from-test-id db test-id)
(let ((res (hash-table-ref/default *test-paths* test-id #f)))
(if res
res
(begin
(sqlite3:for-each-row
|
>
>
>
>
>
>
|
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
|
;;
(define (db:test-set-rundir! db run-id test-name item-path rundir)
(sqlite3:execute
db
"UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;"
rundir run-id test-name item-path))
(define (db:test-set-rundir-by-test-id! db test-id rundir)
(sqlite3:execute
db
"UPDATE tests SET rundir=? WHERE id=?"
rundir test-id))
;;
(define (db:test-get-rundir-from-test-id db test-id)
(let ((res (hash-table-ref/default *test-paths* test-id #f)))
(if res
res
(begin
(sqlite3:for-each-row
|
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
|
;; if the test is not found then clearly the waiton is not met...
;; (if (not ever-seen)(set! result (cons waitontest-name result)))))
(if (not ever-seen)
(set! result (append (if (null? tests)(list waitontest-name) tests) result)))))
waitons)
(delete-duplicates result))))
(define (db:teststep-set-status! db test-id teststep-name state-in status-in item-path comment logfile)
(debug:print 4 "test-id: " test-id " teststep-name: " teststep-name)
(let* ((tdb (db:open-test-db-by-test-id db test-id))
(state (check-valid-items "state" state-in))
(status (check-valid-items "status" status-in)))
(if (or (not state)(not status))
(debug:print 0 "WARNING: Invalid " (if status "status" "state")
" value \"" (if status state-in status-in) "\", update your validvalues section in megatest.config"))
|
|
|
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
|
;; if the test is not found then clearly the waiton is not met...
;; (if (not ever-seen)(set! result (cons waitontest-name result)))))
(if (not ever-seen)
(set! result (append (if (null? tests)(list waitontest-name) tests) result)))))
waitons)
(delete-duplicates result))))
(define (db:teststep-set-status! db test-id teststep-name state-in status-in comment logfile)
(debug:print 4 "test-id: " test-id " teststep-name: " teststep-name)
(let* ((tdb (db:open-test-db-by-test-id db test-id))
(state (check-valid-items "state" state-in))
(status (check-valid-items "status" status-in)))
(if (or (not state)(not status))
(debug:print 0 "WARNING: Invalid " (if status "status" "state")
" value \"" (if status state-in status-in) "\", update your validvalues section in megatest.config"))
|