Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -1669,17 +1669,24 @@ (common:args-get-runname) ;; (or (args:get-arg "-runname")(args:get-arg ":runname")) "%" ;; (common:args-get-testpatt #f) ;; (args:get-arg "-testpatt") ;; state: states status: #f new-state-status: "NOT_STARTED,n/a"))) + (let* ((config-reruns (let ((x (configf:lookup *configdat* "setup" "reruns"))) + (if x (string->number x) #f))) + (rerun-cnt (if config-reruns + config-reruns + 1))) + (runs:run-tests target runname #f ;; (common:args-get-testpatt #f) ;; (or (args:get-arg "-testpatt") ;; "%") user - args:arg-hash))))) + args:arg-hash + run-count: rerun-cnt)))))) ;;====================================================================== ;; run one test ;;====================================================================== Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -395,13 +395,14 @@ ;; per user request. If less than 100Meg space on dbdir partition, bail out with error ;; this will reduce issues in database corruption (common:check-db-dir-and-exit-if-insufficient) ;; override the number of reruns from the configs - (if (and config-reruns - (> run-count config-reruns)) - (set! run-count config-reruns)) + ;; this needs to be done at the place where is first runs:run-tests called + ;(if (and config-reruns + ; (> run-count config-reruns)) + ;(set! run-count config-reruns)) ;; (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10)) (let ((sighand (lambda (signum) ;; (signal-mask! signum) ;; to mask or not? seems to cause issues in exiting @@ -667,13 +668,13 @@ (debug:print-info 4 *default-log-port* "All done by here") ;; TODO: try putting post hook call here (if (eq? run-count 0) (begin (debug:print-info 0 *default-log-port* "Calling Post Hook") - (debug:print-info 4 *default-log-port* " run-count " run-count) + (debug:print-info 2 *default-log-port* " run-count " run-count) (runs:run-post-hook run-id)) - (debug:print-info 4 *default-log-port* "Not calling post hook runcount = " run-count )) + (debug:print-info 2 *default-log-port* "Not calling post hook runcount = " run-count )) (rmt:tasks-set-state-given-param-key task-key "done") ;; (sqlite3:finalize! tasks-db) ))