Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -686,11 +686,11 @@ (let loop ((hed (car test-names)) ;; NOTE: This is the main loop that iterates over the test-names (tal (cdr test-names))) ;; 'return-procs tells the config reader to prep running system but return a proc (debug:print-info 4 *default-log-port* "\n\ntestpatt elaboration loop => hed="hed " tal="tal" test-patts="test-patts" test-names="test-names) (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening. (setenv "MT_TEST_NAME" hed) ;; - (let*-values (((waitons waitors config) (tests:get-waitons hed all-tests-registry (tests:get-global-waitons))) + (let*-values (((waitons waitors config) (tests:get-waitons hed all-tests-registry (tests:get-global-waitons *runconfigdat*))) ;; NOTE: Have the config - can extract [waitons] section ((hed-mode) (let ((m (configf:lookup config "requirements" "mode"))) Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -138,11 +138,11 @@ ((string? (cdr res)) (cdr res)) ;; it is a pair ((string? (cadr res))(cadr res)) ;; it is a list (else cadr res)))))) (define (tests:get-global-waitons rconfig) - (let* ((global-waitons (runconfigs-get config "!GLOBAL_WAITONS"))) + (let* ((global-waitons (runconfigs-get rconfig "!GLOBAL_WAITONS"))) (if (string? global-waitons) (string-split global-waitons) '()))) ;; return items given config @@ -185,11 +185,11 @@ (exit 1)))) (instr2 (if config (configf:lookup config "requirements" "waitor") ""))) (debug:print-info 8 *default-log-port* "waitons string is " instr ", waitors string is " instr2) - (let ((newwaitons-tmp + (let* ((newwaitons-tmp (string-split (cond ((procedure? instr) ;; here (let ((res (instr))) (debug:print-info 8 *default-log-port* "waiton procedure results in string " res " for test " test-name) res)) @@ -205,12 +205,15 @@ res)) ((string? instr2) instr2) (else ;; NOTE: This is actually the case of *no* waitons! ;; (debug:print-error 0 *default-log-port* "something went wrong in processing waitons for test " test-name) "")))) - (newwaitons (if global-waitons - (append newwaitons-tmp global-waitons) + (newwaitons (if (and (list? global-waitons) + (not (null? global-waitons))) + (begin + (debug:print 0 *default-log-port* "Adding global waitons " global-waitons) + (append newwaitons-tmp global-waitons)) newwaitons-tmp))) (values ;; the waitons (filter (lambda (x) (if (hash-table-ref/default all-tests-registry x #f) Index: tests/simplerun/runconfigs.config ================================================================== --- tests/simplerun/runconfigs.config +++ tests/simplerun/runconfigs.config @@ -15,9 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Megatest. If not, see . [default] ALLTESTS see this variable +!GLOBAL_WAITONS test_abc # Your variables here are grouped by targets [SYSTEM/RELEASE] [SYSTEM_val/RELEASE_val] ANOTHERVAR only defined if target is SYSTEM_val/RELEASE_val