Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1248,12 +1248,12 @@ qry ) res)) (define (db:delete-test-records db test-id) - (db:general-call 'delete-test-step-records test-id) - (db:general-call 'delete-test-data-records test-id) + (db:general-call db 'delete-test-step-records (list test-id)) + (db:general-call db 'delete-test-data-records (list test-id)) (sqlite3:execute db "UPDATE tests SET state='DELETED',status='n/a',comment='' WHERE id=?;" test-id)) (define (db:delete-tests-for-run db run-id) (sqlite3:execute db "DELETE FROM tests WHERE run_id=?;" run-id)) @@ -1489,16 +1489,16 @@ (lambda (fcount pcount) (set! fail-count fcount) (set! pass-count pcount)) db "SELECT (SELECT count(id) FROM test_data WHERE test_id=? AND status like 'fail') AS fail_count, - (SELECT count(id) FROM test_data WHERE test_id=? AND status like 'pass') AS pass_count;" + (SELECT count(id) FROM test_data WHERE test_id=? AND status like 'pass') AS pass_count;" test-id test-id) ;; Now rollup the counts to the central megatest.db - (db:general-call 'pass-fail-counts fail-count pass-count test-id) + (db:general-call db 'pass-fail-counts (list fail-count pass-count test-id)) ;; if the test is not FAIL then set status based on the fail and pass counts. - (db:general-call 'test_data-pf-rollup test-id test-id test-id test-id))) + (db:general-call db 'test_data-pf-rollup (list test-id test-id test-id test-id)))) (define (db:csv->test-data db test-id csvdata) (debug:print 4 "test-id " test-id ", csvdata: " csvdata) (let ((csvlist (csv->list (make-csv-reader (open-input-string csvdata) @@ -1777,11 +1777,11 @@ ELSE 'UNKNOWN' END WHERE run_id=? AND testname=? AND item_path='';") ;; STEPS '(delete-test-step-records "UPDATE test_steps SET state='DELETED' WHERE id=?;") - '(delete-test-data-records "UPDATE test_data SET state='DELETED' WHERE id=?;") + '(delete-test-data-records "UPDATE test_data SET status='DELETED' WHERE id=?;") ;; using status since no state field )) ;; do not run these as part of the transaction (define db:special-queries '(rollup-tests-pass-fail ;; db:roll-up-pass-fail-counts ;; WHY NOT!? Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -224,11 +224,11 @@ ;; 2. Continue as above ;; (define (rmt:get-steps-for-test test-id) (rmt:send-receive 'get-steps-data (list test-id))) -(define (rmt:teststep-set-status! db test-id teststep-name state-in status-in comment logfile) +(define (rmt:teststep-set-status! test-id teststep-name state-in status-in comment logfile) (let* ((state (items:check-valid-items "state" state-in)) (status (items:check-valid-items "status" status-in))) (if (or (not state)(not status)) (debug:print 3 "WARNING: Invalid " (if status "status" "state") " value \"" (if status state-in status-in) "\", update your validvalues section in megatest.config")) @@ -257,7 +257,7 @@ (rmt:send-receive 'testmeta-update-field (list test-name fld val))) (define (rmt:test-data-rollup test-id status) (rmt:send-receive 'test-data-rollup (list test-id status))) -(define (db:csv->test-data db test-id csvdata) +(define (rmt:csv->test-data test-id csvdata) (rmt:send-receive 'csv->test-data (list test-id csvdata))) Index: tdb.scm ================================================================== --- tdb.scm +++ tdb.scm @@ -192,11 +192,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) - (rmt:csv->test-data test-id lin work-area: work-area) + (rmt:csv->test-data test-id lin) (loop (read-line))))) ;; roll up the current results. ;; FIXME: Add the status too (rmt:test-data-rollup test-id #f))