Index: common_records.scm ================================================================== --- common_records.scm +++ common_records.scm @@ -56,12 +56,12 @@ (define (debug:print-info n . params) (if (debug:debug-mode n) (with-output-to-port (current-error-port) (lambda () - (let ((res (format#format #f "INFO:~2d ~a" n (apply conc params)))) - (print res) + (let ((res #f));; (format#format #f "INFO:~2d ~a" n (apply conc params)))) + (apply print "INFO: (" n ") " params) ;; res) (if *logging* (db:log-event res))))))) ;; if a value is printable (i.e. string or number) return the value ;; else return an empty string (define-inline (printable val) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -69,11 +69,11 @@ (db:set-sync db) db)) ;; keeping it around for debugging purposes only (define (open-run-close-no-exception-handling proc idb . params) - (debug:print-info 11 "open-run-close-no-exception-handling START, idb=" idb ", params=" params) + (debug:print-info 11 "open-run-close-no-exception-handling START given a db=" (if idb "yes " "no ") ", params=" params) (let* ((db (if idb idb (open-db))) (res #f)) (set! res (apply proc db params)) (if (not idb)(sqlite3:finalize! db)) (debug:print-info 11 "open-run-close-no-exception-handling END" ) @@ -1154,13 +1154,11 @@ (define (cdb:client-call zmq-socket . params) (debug:print-info 11 "cdb:client-call zmq-socket=" zmq-socket " params=" params) (let ((zdat (db:obj->string params)) ;; (with-output-to-string (lambda ()(serialize params)))) (res #f)) - (print "cdb:client-call before send message, params=" params) (send-message zmq-socket zdat) - (print "cdb:client-call after send message") (set! res (db:string->obj (receive-message zmq-socket zdat))) (debug:print-info 11 "zmq-socket " (car params) " res=" res) res)) (define (cdb:test-set-status-state zmqsocket test-id status state msg) @@ -1167,11 +1165,11 @@ (if msg (cdb:client-call zmqsocket 'state-status-msg #t state status msg test-id) (cdb:client-call zmqsocket 'state-status #t state status test-id))) ;; run-id test-name item-path minutes cpuload diskfree tmpfree) (define (cdb:test-rollup-test_data-pass-fail zmqsocket test-id) - (cdb:client-call zmqsocket 'test_data-pf-rollup #t test-id test-id test-id)) + (cdb:client-call zmqsocket 'test_data-pf-rollup #t test-id test-id test-id test-id)) (define (cdb:pass-fail-counts zmqsocket test-id fail-count pass-count) (cdb:client-call zmqsocket 'pass-fail-counts #t fail-count pass-count test-id)) (define (cdb:tests-register-test zmqsocket run-id test-name item-path) @@ -1411,18 +1409,18 @@ (SELECT count(id) FROM test_data WHERE test_id=? AND status like 'pass') AS pass_count;" test-id test-id) (sqlite3:finalize! tdb) ;; Now rollup the counts to the central megatest.db - (cdb:pass-fail-counts *remoterun* test-id fail-count pass-count) + (cdb:pass-fail-counts *runremote* test-id fail-count pass-count) ;; (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 10ms later than the set ;; if the test is not FAIL then set status based on the fail and pass counts. - (cdb:test-rollup-test_data-pass-fail *remoterun* test-id) + (cdb:test-rollup-test_data-pass-fail *runremote* 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' Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -26,15 +26,16 @@ (define (server:run hostn) (debug:print 0 "Attempting to start the server ...") (let ((host:port (open-run-close db:get-var #f "SERVER"))) ;; do whe already have a server running? (if host:port (begin - (debug:print 0 "ERROR: server already running.") + (debug:print 0 "WARNING: server already running.") (if (server:client-setup) (begin - (debug:print-info 0 "Server is alive, exiting") - (exit)) + (debug:print-info 0 "Server is alive, not starting another") + ;;(exit) + ) (begin (debug:print-info 0 "Server is dead, removing flag and trying again") (open-run-close db:del-var #f "SERVER") (server:run hostn)))) (let* ((zmq-socket #f)