@@ -303,28 +303,26 @@ (let* ((test-id (if (number? test-name) test-name (db:keep-trying-until-true rmt:get-test-id (list run-id test-name item-path) - 10))) + 10))) ;; (rmt:get-test-id run-id test-name item-path))) (testdat (rmt:get-test-info-by-id run-id test-id)) ;; (test-id (db:test-get-id testdat)) (test-name (if (number? test-name) (db:test-get-testname testdat) test-name)) (item-path (db:test-get-item-path testdat)) - (tl-testdat (rmt:get-test-info run-id test-name "")) - (tl-test-id (if tl-testdat - (db:test-get-id tl-testdat) - #f)) + (tl-test-id (rmt:get-test-id run-id test-name "")) + (tl-testdat (rmt:get-test-info-by-id run-id test-id)) (new-state-eh #f) (new-status-eh #f)) (if (member state '("LAUNCHED" "REMOTEHOSTSTART")) (rmt:general-call run-id 'set-test-start-time (list test-id))) (let* ((res (begin - (rmt:test-set-state-status-db run-id test-id state status comment) ;; this call sets the item state/status + (rmt:test-set-state-status run-id test-id state status comment) ;; this call sets the item state/status (if (not (equal? item-path "")) ;; only roll up IF incoming test is an item (let* ((state-status-counts (rmt:get-all-state-status-counts-for-test run-id test-name item-path state status)) ;; item-path is used to exclude current state/status of THIS test (state-statuses (db:roll-up-rules state-status-counts state status)) (newstate (car state-statuses)) (newstatus (cadr state-statuses))) @@ -338,11 +336,10 @@ (with-output-to-string (lambda () (pp (dbr:counts->alist x)))) " | ")) state-status-counts))); end debug:print (if tl-test-id (rmt:test-set-state-status run-id tl-test-id newstate newstatus #f)) ;; we are still in the transaction - must access the db and not the dbstruct ))))) - (mutex-unlock! *db-transaction-mutex*) (if (and test-id state status (equal? status "AUTO")) (rmt:test-data-rollup run-id test-id status)) (if new-state-eh ;; moved from db:test-set-state-status (mt:process-triggers run-id test-id new-state-eh new-status-eh)) res)))