Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1260,11 +1260,11 @@ (sqlite3:execute db "UPDATE tests SET fail_count=?,pass_count=? WHERE id=?;" fail-count pass-count test-id) (thread-sleep! 1) ;; play nice with the queue by ensuring the rollup is at least one second later than the set ;; if the test is not FAIL then set status based on the fail and pass counts. - (cdb:test-rollup-iterated-pass-fail test-id) + (rdb:test-rollup-iterated-pass-fail test-id) ;; (sqlite3:execute ;; db ;;; NOTE: Should this be WARN,FAIL? A WARN is not a FAIL????? BUG FIXME ;; "UPDATE tests ;; SET status=CASE WHEN (SELECT fail_count FROM tests WHERE id=?) > 0 ;; THEN 'FAIL' @@ -1569,12 +1569,19 @@ (let ((host (vector-ref *runremote* 0)) (port (vector-ref *runremote* 1))) (apply (rpc:procedure 'rdb:open-run-close host port) procname remargs)) (apply open-run-close (eval procname) remargs))) -;; (define (rdb:test-set-status-state procname . remargs) -;; (if *runremote* -;; (let ((host (vector-ref *runremote* 0)) -;; (port (vector-ref *runremote* 1))) -;; (apply (rpc:procedure 'rdb:open-run-close host port) procname remargs)) -;; (apply open-run-close (eval procname) remargs))) +(define (rdb:test-set-status-state test-id status state) + (if *runremote* + (let ((host (vector-ref *runremote* 0)) + (port (vector-ref *runremote* 1))) + (apply (rpc:procedure 'cdb:test-set-status-state host port) test-id status state)) + (cdb:test-set-status-state test-id status state))) + +(define (rdb:test-rollup-iterated-pass-fail test-id) + (if *runremote* + (let ((host (vector-ref *runremote* 0)) + (port (vector-ref *runremote* 1))) + (apply (rpc:procedure 'cdb:test-rollup-iterated-pass-fail host port) test-id)) + (cdb:test-rollup-iterated-pass-fail test-id))) Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -72,12 +72,18 @@ (apply open-run-close (eval procname) remargs))) (rpc:publish-procedure! 'cdb:test-set-status-state (lambda (test-id status state) - (debug:print 4 "INFO: cdb:test-set-status-state " procname " " remargs) - (apply cdb:test-set-status-state remargs))) + (debug:print 4 "INFO: cdb:test-set-status-state " test-id " " status "/" state) + (apply cdb:test-set-status-state test-id status statue))) + + (rpc:publish-procedure! + 'cdb:test-rollup-iterated-pass-fail + (lambda (test-id) + (debug:print 4 "INFO: cdb:test-rollup-iterated-pass-fail " test-id) + (apply cdb:test-rollup-iterated-pass-fail test-id))) ;;====================================================================== ;; end of publish-procedure section ;;====================================================================== Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -140,11 +140,11 @@ (debug:print 4 "real-status " real-status ", waived " waived ", status " status) ;; update the primary record IF state AND status are defined (if (and state status) ;; (rdb:open-run-close 'cdb:test-set-state-status #f test-id real-status state)) ;; this one works - (cdb:test-set-status-state test-id real-status state)) + (rdb:test-set-status-state test-id real-status state)) ;; if status is "AUTO" then call rollup (note, this one modifies data in test ;; run area, do not rpc it (yet) (if (and test-id state status (equal? status "AUTO")) (open-run-close db:test-data-rollup db test-id status))