@@ -1,7 +1,8 @@ -(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking) +(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp rpc) (import (prefix sqlite3 sqlite3:)) +(import (prefix rpc rpc:)) (declare (unit tests)) (declare (uses db)) (declare (uses common)) (declare (uses items)) @@ -11,11 +12,11 @@ (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") (include "test_records.scm") -(define (register-test db run-id test-name item-path) +(define (tests:register-test db run-id test-name item-path) (let ((item-paths (if (equal? item-path "") (list item-path) (list item-path "")))) (for-each (lambda (pth) @@ -377,5 +378,16 @@ (define (test:archive db test-id) #f) (define (test:archive-tests db keynames target) #f) + +;;====================================================================== +;; R P C +;;====================================================================== + +(define (rtests:register-test db run-id test-name item-path) + (if *runremote* + (let ((host (vector-ref *runremote* 0)) + (port (vector-ref *runremote* 1))) + ((rpc:procedure 'rtests:register-test host port) run-id test-name item-path)) + (tests:register-test db run-id test-name item-path)))