@@ -266,14 +266,15 @@ ;; (print "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " num-running) (if (or (not max-concurrent-jobs) (and max-concurrent-jobs (string->number max-concurrent-jobs) (not (>= num-running (string->number max-concurrent-jobs))))) - (run-one-test db run-id test-name keyvallst) + (run-one-test db run-id test-name keyvallst) (print "WARNING: Max running jobs exceeded, current number running: " num-running ", max_concurrent_jobs: \"" max-concurrent-jobs "\"")))) test-names) + (run-waiting-tests db) (if (args:get-arg "-keepgoing") (let ((estrem (db:estimated-tests-remaining db run-id))) (if (> estrem 0) (begin (print "Keep going, estimated " estrem " tests remaining to run, will continue in 10 seconds ...") @@ -281,11 +282,10 @@ ;; (run-waiting-tests db) (loop (+ numtimes 1))))))))) ;; VERY INEFFICIENT! Move stuff that should be done once up to calling proc (define (run-one-test db run-id test-name keyvallst) - (run-waiting-tests db) (print "Launching test " test-name) ;; All these vars might be referenced by the testconfig file reader (setenv "MT_TEST_NAME" test-name) ;; (setenv "MT_RUNNAME" (args:get-arg ":runname")) (set-megatest-env-vars db run-id) ;; these may be needed by the launching process @@ -320,11 +320,13 @@ (new-test-path (string-intersperse (cons test-path (map cadr itemdat)) "/")) (new-test-name (if (equal? item-path "") test-name (conc test-name "/" item-path))) ;; just need it to be unique (testdat #f) (num-running (db:get-count-tests-running db)) (max-concurrent-jobs (config-lookup *configdat* "setup" "max_concurrent_jobs")) - (parent-test (and (null? items)(equal? item-path "")))) + (parent-test (and (not (null? items))(equal? item-path ""))) + (single-test (and (null? items) (equal? item-path ""))) + (item-test (not (equal? item-path "")))) ;; (print "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " num-running) (if (not (or (not max-concurrent-jobs) (and max-concurrent-jobs (string->number max-concurrent-jobs) (not (>= num-running (string->number max-concurrent-jobs)))))) @@ -361,11 +363,12 @@ (print "ERROR: Failed to insert the record into the db")) ((NOT_STARTED COMPLETED) ;; (print "Got here, " (test:get-state testdat)) (let ((runflag #f)) (cond - (parent-test ;; i.e. this is the parent test to a suite of items + ;; i.e. this is the parent test to a suite of items, never "run" it + (parent-test (set! runflag #f)) ;; -force, run no matter what ((args:get-arg "-force")(set! runflag #t)) ;; NOT_STARTED, run no matter what ((equal? (test:get-state testdat) "NOT_STARTED")(set! runflag #t))