Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -825,11 +825,18 @@ (let* ((keys (db-get-keys db)) (keyvallst (keys:target->keyval keys target)) (run-id (runs:register-run db keys keyvallst runname "new" "n/a" user)) ;; test-name))) (deferred '()) ;; delay running these since they have a waiton clause (keepgoing (hash-table-ref/default flags "-keepgoing" #f)) - (test-names '())) + (test-names '()) + (runconfigf (conc *toppath* "/runconfigs.config")) + (required-tests '())) + + (if (file-exists? runconfigf) + (setup-env-defaults db runconfigf run-id *already-seen-runconfig-info*) + (debug:print 0 "WARNING: You do not have a run config file: " runconfigf)) + ;; look up all tests matching the comma separated list of globs in ;; test-patts (using % as wildcard) (for-each (lambda (patt) (let ((tests (glob (conc *toppath* "/tests/" (string-translate patt "%" "*"))))) @@ -838,25 +845,37 @@ (map (lambda (testp) (last (string-split testp "/"))) tests))))) (string-split test-patts ",")) - ;; now remove duplicates + ;; now remove duplicates (set! test-names (delete-duplicates test-names)) (debug:print 0 "INFO: test names " test-names) ;; now add non-directly referenced dependencies (i.e. waiton) ;; could cache all these since they need to be read again ... ;; FIXME SOMEDAY - (for-each - (lambda (test-name) - (let* ((config (test:get-testconfig test-name #f)) - (waiton (config-lookup config "requirements" "waiton"))) - (if (and waiton (not (member waiton test-names))) - (set! test-names (append test-names (list waiton)))))) - test-names) + (if (not (null? test-names)) + (let loop ((hed (car test-names)) + (tal (cdr test-names))) + (let* ((config (test:get-testconfig hed #f)) + (waitons (string-split (let ((w (config-lookup config "requirements" "waiton"))) + (if w w ""))))) + (for-each + (lambda (waiton) + (if (and waiton (not (member waiton test-names))) + (begin + (set! required-tests (cons waiton required-tests)) + (set! test-names (append test-names (list waiton)))))) + waitons) + (let ((remtests (delete-duplicates (append waitons tal)))) + (if (not (null? remtests)) + (loop (car remtests)(cdr remtests))))))) + + (if (not (null? required-tests)) + (debug:print 1 "INFO: Adding " required-tests " to the run queue")) ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if ;; -keepgoing is specified (if (and (eq? *passnum* 0) keepgoing) @@ -982,10 +1001,13 @@ (debug:print 0 "WARNING: Couldn't register test " test-name " with item path " item-path ", skipping") (if (not (null? tal)) (loop (car tal)(cdr tal))))))) (change-directory test-path) ;; this block is here only to inform the user early on + + ;; Moving this to the run calling block + ;; (if (file-exists? runconfigf) ;; (setup-env-defaults db runconfigf run-id *already-seen-runconfig-info*) ;; (debug:print 0 "WARNING: You do not have a run config file: " runconfigf)) (debug:print 4 "run-id: " run-id " test-name: " test-name " item-path: " item-path " testdat: " (test:get-status testdat) " test-state: " (test:get-state testdat)) (case (if force ;; (args:get-arg "-force") Index: tests/megatest.config ================================================================== --- tests/megatest.config +++ tests/megatest.config @@ -3,11 +3,11 @@ fsname TEXT datapath TEXT [setup] # exectutable /path/to/megatest -max_concurrent_jobs 5 +max_concurrent_jobs 50 runsdir /tmp/runs [jobtools] # useshell yes # ## launcher launches jobs, the job is managed on the target host