Index: ezsteps.scm ================================================================== --- ezsteps.scm +++ ezsteps.scm @@ -66,11 +66,11 @@ ;; (tests:test-force-state-status! run-id test-id "RUNNING" "n/a") (rmt:set-state-status-and-roll-up-items run-id test-name item-path "RUNNING" #f #f) ;; (thread-sleep! 0.3) ;; NFS slowness has caused grief here ;; if there is a runscript do it first - (if fullrunscript + (if fullrunscript ;;; user controlled steps (let ((pid (process-run fullrunscript))) (rmt:test-set-top-process-pid run-id test-id pid) (let loop ((i 0)) (let-values (((pid-val exit-status exit-code) (process-wait pid #t))) @@ -138,11 +138,11 @@ (debug:print-info 0 *default-log-port* "Processing ezstep \"" (string-intersperse ezstep " ") "\"") ;; check exit-info (vector-ref exit-info 1) (if (launch:einf-exit-status exit-info) ;; (vector-ref exit-info 1) (let ((logpro-used (ezsteps:runstep ezstep run-id test-id - exit-info: exit-info mutix: m is-last-step: (null? tal) testconfig: testconfig)) + exit-info: exit-info mutex: m is-last-step: (null? tal) testconfig: testconfig)) (stepname (car ezstep))) ;; if logpro-used read in the stepname.dat file (if (and logpro-used (common:file-exists? (conc stepname ".dat"))) (launch:load-logpro-dat run-id test-id stepname)) (if (ezsteps:steprun-good? logpro-used (launch:einf-exit-code exit-info)) Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -70,11 +70,11 @@ (status (conc (configf:lookup dat "final" "exit-status") ": " (if msg msg "no message"))) (else #f))) #f))) - +;; monitors a test. check for kill signal, watch cpu load and disk free (define (launch:monitor-job run-id test-id item-path fullrunscript ezsteps test-name tconfigreg exit-info m work-area runtlim misc-flags) (let* ((update-period (string->number (or (configf:lookup *configdat* "setup" "test-stats-update-period") "30"))) (start-seconds (current-seconds)) (calc-minutes (lambda () (inexact->exact @@ -167,12 +167,15 @@ (or new-cpu-load cpu-load) (or new-disk-free disk-free) (if do-sync (current-seconds) last-sync))))))) (tests:update-central-meta-info run-id test-id (get-cpu-load) (get-df (current-directory))(calc-minutes) #f #f))) ;; NOTE: Checking twice for keep-going is intentional +;; rerun one step +;; rerun one step and subsequent steps +;; rerun logpro for each step (extracting from tconfig if source is there), inheriting env -(define (launch:execute encoded-cmd) +(define (launch:execute encoded-cmd #!key (ezsteps-logpro-redo #f)) (let* ((cmdinfo (common:read-encoded-string encoded-cmd)) (tconfigreg #f)) (setenv "MT_CMDINFO" encoded-cmd) ;;(bb-check-path msg: "launch:execute incoming") (if (list? cmdinfo) ;; ((testpath /tmp/mrwellan/jazzmind/src/example_run/tests/sqlitespeed) @@ -275,10 +278,11 @@ (setenv "MT_TEST_RUN_DIR" work-area) (launch:setup) ;; should be properly in the run area home now (set! tconfigreg (tests:get-all)) ;; mapping of testname => test source path + ;; TODO in 2.0: capture stack dump in execute to set incomplete like below does for signals (let ((sighand (lambda (signum) ;; (signal-mask! signum) ;; to mask or not? seems to cause issues in exiting (if (eq? signum signal/stop) (debug:print-error 0 *default-log-port* "attempt to STOP process. Exiting.")) (set! *time-to-exit* #t)