Index: ezsteps.scm ================================================================== --- ezsteps.scm +++ ezsteps.scm @@ -37,16 +37,19 @@ ;;(rmt:get-test-info-by-id run-id test-id) -> testdat -(define (ezsteps:run-from testdat start-step-name run-one #!key (rerun-logpro-only #f)) +(define (ezsteps:run-from testdat start-step-name-in run-one #!key (rerun-logpro-only #f) ) ;; TODO: honor rerun-logpro-only + (if rerun-logpro-only + (BB> "someday soon...") (let* ((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" '())) + (start-step-name (or start-step-name-in (if (null? ezsteplst) #f (car ezsteplst)))) (run-mutex (make-mutex)) (rollup-status 0) (exit-info (vector #t #t #t)) (test-id (db:test-get-id testdat)) (run-id (db:test-get-run_id testdat)) @@ -185,15 +188,15 @@ ;; 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 ))) (pop-directory) - rollup-status)) + rollup-status))) (define (ezsteps:spawn-run-from testdat start-step-name run-one) (thread-start! (make-thread (lambda () (ezsteps:run-from testdat start-step-name run-one)) (conc "ezstep run single step " start-step-name " run-one="run-one))) ) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -1054,10 +1054,11 @@ (exit 1)) ;; put test parameters into convenient variables (begin ;; check for correct version, exit with message if not correct (common:exit-on-version-changed) + (BB> "before runs:operate-on") (runs:operate-on action target (common:args-get-runname) ;; (or (args:get-arg "-runname")(args:get-arg ":runname")) (common:args-get-testpatt #f) ;; (args:get-arg "-testpatt") state: (common:args-get-state) @@ -1094,11 +1095,12 @@ "-set-state-status" "set state and status" (lambda (target runname keys keyvals) (operate-on 'set-state-status)))) -(if (args:get-arg "-redo-logpro") +(when (args:get-arg "-redo-logpro") + (BB> "redo-logpro request from command line detected") (general-run-call "-redo-logpro" "rerun logpro in ezsteps" (lambda (target runname keys keyvals) (operate-on 'redo-logpro)))) Index: redo-logpro.scm ================================================================== --- redo-logpro.scm +++ redo-logpro.scm @@ -17,21 +17,20 @@ ;; (declare (unit redo-logpro)) (declare (uses common)) (declare (uses rmt)) - +(declare (uses ezsteps)) (include "common_records.scm") (use matchable) (use fmt) (use ducttape-lib) (define css "") -(define (redo-logpro:redo-logpro) - ;; TODO: get list of all test ids matching selectors - ;; TODO: iterate over tests ids list +(define (redo-logpro:redo-logpro run-id test-id testdat) ;; TODO: populate testdat from testid, start-step-name (from first step) ;; TODO: (ezsteps:run-from testdat start-step-name #f rerun-logpro-only: #t)) - + (BB> "redo-logpro:redo-logpro called with run-id="run-id" test-id="test-id" testdat="testdat) + (ezsteps:run-from testdat #f #f rerun-logpro-only: #t) (print "redo-logpro Unimplemented") #f) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -28,10 +28,11 @@ (declare (uses runconfig)) (declare (uses tests)) (declare (uses server)) (declare (uses mt)) (declare (uses archive)) +;;(declare (uses redo-logpro)) ;; (declare (uses filedb)) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") @@ -2009,10 +2010,11 @@ ;; 'set-state-status ;; ;; NB// should pass in keys? ;; (define (runs:operate-on action target runnamepatt testpatt #!key (state #f)(status #f)(new-state-status #f)(mode #f)(options '())) + (BB> "in runs:operate-on with action >"action"<") (common:clear-caches) ;; clear all caches (let* ((db #f) ;; (tdbdat (tasks:open-db)) (keys (rmt:get-keys)) (rundat (mt:get-runs-by-patt keys runnamepatt target)) @@ -2069,10 +2071,11 @@ (tasks:kill-runner target run-name testpatt) ;; (debug:print 0 *default-log-port* "not attempting to kill any run launcher processes as testpatt is " testpatt)) (debug:print 1 *default-log-port* "Removing tests for run: " runkey " " (db:get-value-by-header run header "runname"))) ((redo-logpro) + (BB> "redo-logpro operate-on hook 1") (debug:print 1 *default-log-port* "Re-applying new logpro rules without rerun for tests for run: " runkey " " (db:get-value-by-header run header "runname"))) ((set-state-status) ;; (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10)) (debug:print 1 *default-log-port* "Modifying state and staus for tests for run: " runkey " " (db:get-value-by-header run header "runname"))) ((print-run) @@ -2235,12 +2238,15 @@ (runs:remove-test-directory new-test-dat mode) ;; 'remove-all) (if (not (null? tal)) (loop (car tal)(cdr tal))))))) (rmt:update-run-stats run-id (rmt:get-raw-run-stats run-id))) ((redo-logpro) + (BB> "redo-logpro operate-on hook 2") + (redo-logpro:redo-logpro run-id test-id new-test-dat) (debug:print-error 0 "redo-logpro unimplemented") - ;;(exit 1) + (if (not (null? tal)) + (loop (car tal)(cdr tal))) ) ((set-state-status) (let* ((new-state (car state-status)) (new-status (cadr state-status)) (test-id (db:test-get-id test))