Index: ezsteps.scm ================================================================== --- ezsteps.scm +++ ezsteps.scm @@ -39,22 +39,25 @@ (define (ezsteps:run-from testdat start-step-name run-one) ;;# TODO - recapture item variables, debug repeated step eval; regen logpro from test - (let* ((test-run-dir ;; (filedb:get-path *fdb* + (let* ((do-update-test-state-status #f) + (test-run-dir ;; (filedb:get-path *fdb* (db:test-get-rundir testdat)) ;; ) (testconfig (read-config (conc test-run-dir "/testconfig") #f #t environ-patt: "pre-launch-env-vars")) (ezstepslst (hash-table-ref/default testconfig "ezsteps" '())) (run-mutex (make-mutex)) (rollup-status 0) (rollup-status-string #f) (rollup-status-sym #f) (exit-info (vector #t #t #t)) - (test-id (db:test-get-id testdat)) - (run-id (db:test-get-run_id testdat)) - (test-name (db:test-get-testname testdat)) + (test-id (db:test-get-id testdat)) + (run-id (db:test-get-run_id testdat)) + (test-name (db:test-get-testname testdat)) + (orig-test-state (db:test-get-state testdat)) + (orig-test-status (db:test-get-status testdat)) (kill-job #f)) ;; for future use (on re-factoring with launch.scm code ;; keep trying till NFS deigns to populate test run dir on this host (let loop ((count 5)) (if (not (common:file-exists? test-run-dir)) @@ -89,11 +92,14 @@ (proceed-with-this-step (or (not start-step-name) (equal? stepname start-step-name) (and saw-start-step-name (not run-one)) saw-start-step-name-next - (and start-step-name (equal? stepname start-step-name))))) + (and start-step-name (equal? stepname start-step-name)))) + ) + (set! do-update-test-state-status (and proceed-with-this-step (null? tal))) + ;;(BB> "stepname="stepname" proceed-with-this-step="proceed-with-this-step " do-update-test-state-status="do-update-test-state-status " orig-test-state="orig-test-state" orig-test-status="orig-test-status) (cond ((and (not proceed-with-this-step) (null? tal)) 'done) ((not proceed-with-this-step) (loop (car tal) @@ -166,15 +172,15 @@ ) (new-status rollup-status-string) ) ;; (db:test-get-status testinfo))) (debug:print-info 2 *default-log-port* "Test NOT logged as COMPLETED, (state=" (db:test-get-state testinfo) "), updating result, rollup-status is " rollup-status) (tests:test-set-status! run-id test-id - new-state - new-status + (if do-update-test-state-status new-state orig-test-state) + (if do-update-test-state-status new-status orig-test-status) (args:get-arg "-m") #f) ;; need to update the top test record if PASS or FAIL and this is a subtest - (if (not (equal? item-path "")) + (if (and (not (equal? item-path "")) do-update-test-state-status) (rmt:set-state-status-and-roll-up-items run-id test-name item-path new-state new-status #f)))) ;; for automated creation of the rollup html file this is a good place... (if (not (equal? item-path "")) (tests:summarize-items run-id test-id test-name #f)) ;; don't force - just update if no )))