Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -46,11 +46,11 @@ (if (vector? x) (vector->list x) x)) res))) ((roll-up-pass-fail-counts) (apply db:roll-up-pass-fail-counts db params)) - + ((update-fail-pass-counts) (apply db:general-call db 'update-pass-fail-counts params)) ;; RUNS ((get-run-info) (let ((res (apply db:get-run-info db params))) (list (vector-ref res 0) (vector->list (vector-ref res 1))))) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1633,11 +1633,11 @@ ;; (apply cdb:client-call *runremote* 'immediate #f *default-numtries* open-run-close proc #f params) ;; (begin ;; (debug:print 0 "ERROR: Attempt to access read-only database") ;; #f))) -(define (rmt:roll-up-pass-fail-counts run-id test-name item-path status) +(define (db:roll-up-pass-fail-counts db run-id test-name item-path status) (if (and (not (equal? item-path "")) (member status '("PASS" "WARN" "FAIL" "WAIVED" "RUNNING" "CHECK" "SKIP"))) (begin (db:general-call 'update-pass-fail-counts db (list run-id test-name run-id test-name)) (if (equal? status "RUNNING") @@ -1693,11 +1693,11 @@ '(update-run-duration "UPDATE tests SET run_duration=? WHERE id=?;") '(update-uname-host "UPDATE tests SET uname=?,host=? WHERE id=?;") '(update-test-state "UPDATE tests SET state=? WHERE state=? AND run_id=? AND testname=? AND NOT (item_path='' AND testname IN (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));") '(update-test-status "UPDATE tests SET status=? WHERE status like ? AND run_id=? AND testname=? AND NOT (item_path='' AND testname IN (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));") ;; stuff for roll-up-pass-fail-counts - '(update-fail-pass-counts "UPDATE tests + '(update-pass-fail-counts "UPDATE tests SET fail_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND status IN ('FAIL','CHECK')), pass_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND status IN ('PASS','WARN','WAIVED')) WHERE run_id=? AND testname=? AND item_path='';") '(top-test-set-running "UPDATE tests SET state='RUNNING' WHERE run_id=? AND testname=? AND item_path='';") '(top-test-set-per-pf-counts "UPDATE tests Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -40,11 +40,11 @@ (begin (debug:print 0 "ERROR: Bad value from http-transport:client-api-send-receive " res) #f)) )) (else - (debug:print 0 "ERROR: Transport not yet (re)supported") + (debug:print 0 "ERROR: Transport " *transport-type* " not yet (re)supported") (exit 1)))) ;; Wrap json library for strings (why the ports crap in the first place?) (define (rmt:dat->json-str dat) (with-output-to-string @@ -172,19 +172,11 @@ (define (rmt:get-count-tests-running-in-jobgroup jobgroup) (rmt:send-receive 'get-count-tests-running-in-jobgroup (list jobgroup))) (define (rmt:roll-up-pass-fail-counts run-id test-name item-path status) - (if (and (not (equal? item-path "")) - (member status '("PASS" "WARN" "FAIL" "WAIVED" "RUNNING" "CHECK" "SKIP"))) - (begin - (cdb:update-pass-fail-counts *runremote* run-id test-name) - (if (equal? status "RUNNING") - (cdb:top-test-set-running *runremote* run-id test-name) - (cdb:top-test-set-per-pf-counts *runremote* run-id test-name)) - #f) - #f)) + (rmt:send-receive 'roll-up-pass-fail-counts (list run-id test-name item-path status))) (define (rmt:update-pass-fail-counts run-id test-name) (rmt:general-call 'update-fail-pass-counts run-id test-name run-id test-name run-id test-name)) ;;====================================================================== Index: tdb.scm ================================================================== --- tdb.scm +++ tdb.scm @@ -214,11 +214,11 @@ ", expected: " expected " tol: " tol " units: " units " status: " status " comment: " comment " type: " type) (if (and (or (not expected)(equal? expected "")) (or (not tol) (equal? expected "")) (or (not units) (equal? expected ""))) - (let-values (((new-expected new-tol new-units)(tdb:get-prev-tol-for-test db test-id category variable))) + (let-values (((new-expected new-tol new-units)(tdb:get-prev-tol-for-test tdb test-id category variable))) (set! expected new-expected) (set! tol new-tol) (set! units new-units))) (debug:print 4 "AFTER: category: " category " variable: " variable " value: " value @@ -263,11 +263,11 @@ (define (tdb:load-test-data test-id #!key (work-area #f)) (let loop ((lin (read-line))) (if (not (eof-object? lin)) (begin (debug:print 4 lin) - (tdb:csv->test-data db test-id lin work-area: work-area) + (tdb:csv->test-data test-id lin work-area: work-area) (loop (read-line))))) ;; roll up the current results. ;; FIXME: Add the status to (tdb:test-data-rollup db test-id #f work-area: work-area)) @@ -316,11 +316,11 @@ ;; ELSE status ;; END WHERE id=?;" ;; test-id test-id test-id test-id) )))) -(define (tdb:get-prev-tol-for-test test-id category variable) +(define (tdb:get-prev-tol-for-test tdb test-id category variable) ;; Finish me? (values #f #f #f)) ;;====================================================================== ;; S T E P S