@@ -48,16 +48,11 @@ (debug:print 0 "ERROR: Called setup in a non-megatest area, exiting") (exit 1))))) (runrec (runs:runrec-make-record)) (target (common:args-get-target)) (runname (common:args-get-runname)) - (testpatt (common:args-get-testpatt)) -;; (args-testpatt (or (args:get-arg "-testpatt") -;; (args:get-arg "-runtests"))) -;; (testpatt (or (and (equal? args-testpatt "%") -;; (getenv "TESTPATT")) -;; args-testpatt)) + (testpatt (common:args-get-testpatt #f)) (keys (keys:config-get-fields mconfig)) (keyvals (keys:target->keyval keys target)) (toppath *toppath*) (envdat keyvals) ;; initial values start with keyvals (runconfig #f) @@ -89,11 +84,11 @@ (if db (sqlite3:finalize! db)) (exit 1))) ;; Now have runconfigs data loaded, set environment vars ;; Only now can we calculate the testpatt - (set! testpatt (common:args-get-testpatt)) + (set! testpatt (common:args-get-testpatt runconfig)) (for-each (lambda (section) (for-each (lambda (varval) (set! envdat (append envdat (list varval))) (safe-setenv (car varval)(cadr varval))) @@ -253,18 +248,24 @@ (thread-start! th1) (thread-join! th2))))) (set-signal-handler! signal/int sighand) (set-signal-handler! signal/term sighand) (set-signal-handler! signal/stop sighand)) + + (runs:set-megatest-env-vars run-id inkeys: keys inrunname: runname) ;; these may be needed by the launching process + (set! runconf (if (file-exists? runconfigf) + (setup-env-defaults runconfigf run-id *already-seen-runconfig-info* keyvals target) + (begin + (debug:print 0 "WARNING: You do not have a run config file: " runconfigf) + #f))) ;; register this run in monitor.db (rmt:tasks-add "run-tests" user target runname test-patts task-key) ;; params) (rmt:tasks-set-state-given-param-key task-key "running") - (runs:set-megatest-env-vars run-id inkeys: keys inrunname: runname) ;; these may be needed by the launching process - (if (file-exists? runconfigf) - (setup-env-defaults runconfigf run-id *already-seen-runconfig-info* keyvals target) - (debug:print 0 "WARNING: You do not have a run config file: " runconfigf)) + + (if (not test-patts) ;; first time in - adjust testpatt + (set! test-patts (common:args-get-testpatt runconf))) ;; Now generate all the tests lists (set! all-tests-registry (tests:get-all)) (set! all-test-names (hash-table-keys all-tests-registry)) (set! test-names (tests:filter-test-names all-test-names test-patts)) @@ -436,11 +437,11 @@ ))) waitons) (let ((remtests (delete-duplicates (append waitons tal)))) (if (not (null? remtests)) (begin - (debug:print-info 0 "Preprocessing continues for " (string-intersperse remtests ", ")) + ;; (debug:print-info 0 "Preprocessing continues for " (string-intersperse remtests ", ")) (loop (car remtests)(cdr remtests)))))))) (if (not (null? required-tests)) (debug:print-info 1 "Adding \"" (string-intersperse required-tests " ") "\" to the run queue")) ;; NOTE: these are all parent tests, items are not expanded yet.