956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
|
;;
(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
|
>
>
>
|
|
|
|
|
|
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
|
;;
(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 (cdb:test-set-rundir-by-test-id zmqsocket test-id rundir)
(cdb:client-call zmqsocket 'test-set-rundir-by-test-id #t test-id rundir))
;; (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
|
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
|
END WHERE id=?;")
(rollup-tests-pass-fail "UPDATE tests
SET fail_count=(SELECT count(id) FROM tests WHERE
run_id=? AND testname=? AND item_path != '' AND status='FAIL'),
pass_count=(SELECT count(id) FROM tests WHERE
run_id=? AND testname=? AND item_path != '' AND (status='PASS' OR status='WARN' OR status='WAIVED'))
WHERE run_id=? AND testname=? AND item_path='';")
(test-set-log "UPDATE tests SET final_logf=? WHERE id=?;")))
(define db:special-queries '(rollup-tests-pass-fail))
(define db:run-local-queries '(rollup-tests-pass-fail))
;; The queue is a list of vectors where the zeroth slot indicates the type of query to
;; apply and the second slot is the time of the query and the third entry is a list of
;; values to be applied
|
|
>
|
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
|
END WHERE id=?;")
(rollup-tests-pass-fail "UPDATE tests
SET fail_count=(SELECT count(id) FROM tests WHERE
run_id=? AND testname=? AND item_path != '' AND status='FAIL'),
pass_count=(SELECT count(id) FROM tests WHERE
run_id=? AND testname=? AND item_path != '' AND (status='PASS' OR status='WARN' OR status='WAIVED'))
WHERE run_id=? AND testname=? AND item_path='';")
(test-set-log "UPDATE tests SET final_logf=? WHERE id=?;")
(test-set-rundir-by-test-id "UPDATE tests SET rundir=? WHERE id=?")))
(define db:special-queries '(rollup-tests-pass-fail))
(define db:run-local-queries '(rollup-tests-pass-fail))
;; The queue is a list of vectors where the zeroth slot indicates the type of query to
;; apply and the second slot is the time of the query and the third entry is a list of
;; values to be applied
|