@@ -47,11 +47,11 @@ files) (declare (unit db)) (declare (uses common)) (declare (uses dbmod)) -;; (declare (uses debugprint)) +(declare (uses debugprint)) (declare (uses dbfile)) (declare (uses keys)) (declare (uses ods)) ;; (declare (uses client)) (declare (uses mt)) @@ -62,12 +62,13 @@ (include "run_records.scm") (define *number-of-writes* 0) (define *number-non-write-queries* 0) -(import dbmod) -(import dbfile) +(import dbmod + dbfile + debugprint) ;; record for keeping state,status and count for doing roll-ups in ;; iterated tests ;; (defstruct dbr:counts @@ -3144,42 +3145,42 @@ ;;====================================================================== ;; QUEUE UP META, TEST STATUS AND STEPS REMOTE ACCESS ;;====================================================================== -;; NOTE: Can remove the regex and base64 encoding for zmq -(define (db:obj->string obj #!key (transport 'http)) - (case transport - ;; ((fs) obj) - ((http fs) - (string-substitute - (regexp "=") "_" - (base64:base64-encode - (z3:encode-buffer - (with-output-to-string - (lambda ()(serialize obj))))) ;; BB: serialize - this is what causes problems between different builds of megatest communicating. serialize is sensitive to binary image of mtest. - #t)) - ((zmq nmsg)(with-output-to-string (lambda ()(serialize obj)))) - (else obj))) ;; rpc - -(define (db:string->obj msg #!key (transport 'http)) - (case transport - ;; ((fs) msg) - ((http fs) - (if (string? msg) - (with-input-from-string - (z3:decode-buffer - (base64:base64-decode - (string-substitute - (regexp "_") "=" msg #t))) - (lambda ()(deserialize))) - (begin - (debug:print-error 0 *default-log-port* "reception failed. Received \"" msg "\" but cannot translate it.") - (print-call-chain (current-error-port)) - msg))) ;; crude reply for when things go awry - ((zmq nmsg)(with-input-from-string msg (lambda ()(deserialize)))) - (else msg))) ;; rpc +;; ;; NOTE: Can remove the regex and base64 encoding for zmq +;; (define (db:obj->string obj #!key (transport 'http)) +;; (case transport +;; ;; ((fs) obj) +;; ((http fs) +;; (string-substitute +;; (regexp "=") "_" +;; (base64:base64-encode +;; (z3:encode-buffer +;; (with-output-to-string +;; (lambda ()(serialize obj))))) ;; BB: serialize - this is what causes problems between different builds of megatest communicating. serialize is sensitive to binary image of mtest. +;; #t)) +;; ((zmq nmsg)(with-output-to-string (lambda ()(serialize obj)))) +;; (else obj))) ;; rpc +;; +;; (define (db:string->obj msg #!key (transport 'http)) +;; (case transport +;; ;; ((fs) msg) +;; ((http fs) +;; (if (string? msg) +;; (with-input-from-string +;; (z3:decode-buffer +;; (base64:base64-decode +;; (string-substitute +;; (regexp "_") "=" msg #t))) +;; (lambda ()(deserialize))) +;; (begin +;; (debug:print-error 0 *default-log-port* "reception failed. Received \"" msg "\" but cannot translate it.") +;; (print-call-chain (current-error-port)) +;; msg))) ;; crude reply for when things go awry +;; ((zmq nmsg)(with-input-from-string msg (lambda ()(deserialize)))) +;; (else msg))) ;; rpc ;; ; This is to be the big daddy call NOPE: Replaced by db:set-state-status-and-roll-up-items ;; ; ;; define (db:test-set-state-status dbstruct run-id test-id state status msg) ;; (let ((dbdat (db:get-subdb dbstruct run-id)))