Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -706,11 +706,12 @@ (not status))) (begin (debug:print 0 "ERROR: You must specify :state and :status with every call to -test-status\n" help) (sqlite3:finalize! db) (exit 6))) - (rtests:test-set-status! db run-id test-name state newstatus itemdat (args:get-arg "-m") otherdata))) + (let ((msg (args:get-arg "-m"))) + (rtests:test-set-status! db test-id state newstatus msg otherdata)))) (sqlite3:finalize! db) (set! *didsomething* #t)))) (if (args:get-arg "-showkeys") (let ((db #f) Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -233,13 +233,13 @@ (set! *last-db-access* (current-seconds)) (db:test-data-rollup db test-id status))) (rpc:publish-procedure! 'rtests:test-set-status! - (lambda (run-id test-name state status itemdat-or-path comment dat) + (lambda (test-id state status comment dat) (set! *last-db-access* (current-seconds)) - (test-set-status! db run-id test-name state status itemdat-or-path comment dat))) + (test-set-status! db test-id state status comment dat))) ;;====================================================================== ;; end of publish-procedure section ;;====================================================================== Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -51,11 +51,11 @@ ;; if found then return that matching test record (debug:print 4 "selstr: " selstr ", qrystr: " qrystr ", keyvals: " keyvals ", previous run ids found: " prev-run-ids) (if (null? prev-run-ids) #f (let loop ((hed (car prev-run-ids)) (tal (cdr prev-run-ids))) - (let ((results (rdb:get-tests-for-run db hed test-name item-path '() '()))) + (let ((results (db:get-tests-for-run db hed test-name item-path '() '()))) (debug:print 4 "Got tests for run-id " run-id ", test-name " test-name ", item-path " item-path ": " results) (if (and (null? results) (not (null? tal))) (loop (car tal)(cdr tal)) (if (null? results) #f @@ -108,16 +108,17 @@ (if (null? tal) (map cdr (hash-table->alist tests-hash)) ;; return a list of the most recent tests (loop (car tal)(cdr tal)))))))))) ;; -(define (test-set-status! db run-id test-name state status itemdat-or-path comment dat) +(define (test-set-status! db test-id state status comment dat) (let* ((real-status status) - (item-path (if (string? itemdat-or-path) itemdat-or-path (item-list->path itemdat-or-path))) - (testdat (rdb:get-test-info db run-id test-name item-path)) - (test-id (if testdat (db:test-get-id testdat) #f)) (otherdat (if dat dat (make-hash-table))) + (testdat (db:get-test-data-by-id db test-id)) + (run-id (db:test-get-run_id testdat)) + (test-name (db:test-get-testname testdat)) + (item-path (db:test-get-item-path testdat)) ;; before proceeding we must find out if the previous test (where all keys matched except runname) ;; was WAIVED if this test is FAIL (waived (if (equal? status "FAIL") (let ((prev-test (test:get-previous-test-run-record db run-id test-name item-path))) (if prev-test ;; true if we found a previous test in this run series @@ -386,11 +387,11 @@ (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))) -(define (rtests:test-set-status! db run-id test-name state status itemdat-or-path comment dat) +(define (rtests:test-set-status! db test-id state status comment dat) (if *runremote* (let ((host (vector-ref *runremote* 0)) (port (vector-ref *runremote* 1))) - ((rpc:procedure 'rtests:test-set-status! host port) run-id test-name state status itemdat-or-path comment dat)) - (test-set-status! db run-id test-name state status itemdat-or-path comment dat))) + ((rpc:procedure 'rtests:test-set-status! host port) test-id state status comment dat)) + (test-set-status! db test-id state status comment dat)))