Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -214,11 +214,11 @@ ) ;; NFS might not have propagated the directory meta data to the run host - give it time if needed (let loop ((count 0)) (if (or (file-exists? top-path) - (< count 10)) + (> count 10)) (change-directory top-path) (begin (debug:print 0 "INFO: Not starting job yet - directory " top-path " not found") (thread-sleep! 10) (loop (+ count 1))))) @@ -293,18 +293,18 @@ (list "default" target))) ;; NFS might not have propagated the directory meta data to the run host - give it time if needed (let loop ((count 0)) (if (or (file-exists? work-area) - (< count 10)) + (> count 10)) (change-directory work-area) (begin (debug:print 0 "INFO: Not starting job yet - directory " work-area " not found") (thread-sleep! 10) (loop (+ count 1))))) - (change-directory work-area) + ;; (change-directory work-area) (set! keyvals (keys:target->keyval keys target)) ;; apply pre-overrides before other variables. The pre-override vars must not ;; clobbers things from the official sources such as megatest.config and runconfigs.config (if (string? set-vars) (let ((varpairs (string-split set-vars ","))) @@ -404,11 +404,13 @@ ))))) ;; then, if runscript ran ok (or did not get called) ;; do all the ezsteps (if any) (if ezsteps (let* ((testconfig ;; (read-config (conc work-area "/testconfig") #f #t environ-patt: "pre-launch-env-vars")) ;; FIXME??? is allow-system ok here? - (tests:get-testconfig test-name tconfigreg #t)) ;; 'return-procs))) + ;; NOTE: it is tempting to turn off force-create of testconfig but dynamic + ;; ezstep names need a full re-eval here. + (tests:get-testconfig test-name tconfigreg #t force-create: #t)) ;; 'return-procs))) (ezstepslst (hash-table-ref/default testconfig "ezsteps" '()))) (hash-table-set! *testconfigs* test-name testconfig) ;; cached for lazy reads later ... (if (not (file-exists? ".ezsteps"))(create-directory ".ezsteps")) ;; if ezsteps was defined then we are sure to have at least one step but check anyway (if (not (> (length ezstepslst) 0)) @@ -856,11 +858,11 @@ )) (let* ((tregistry (tests:get-all)) (item-path (let ((ip (item-list->path itemdat))) (alist->env-vars (list (list "MT_ITEMPATH" ip))) ip)) - (tconfig (or (tests:get-testconfig test-name tregistry #t) + (tconfig (or (tests:get-testconfig test-name tregistry #t force-create: #t) test-conf)) ;; force re-read now that all vars are set (useshell (let ((ush (config-lookup *configdat* "jobtools" "useshell"))) (if ush (if (equal? ush "no") ;; must use "no" to NOT use shell #f Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -728,18 +728,20 @@ (getenv "MT_TEST_NAME") "/" (if (or (getenv "MT_ITEMPATH") (not (string=? "" (getenv "MT_ITEMPATH")))) (conc "/" (getenv "MT_ITEMPATH")))))) -(define (tests:get-testconfig test-name test-registry system-allowed) +(define (tests:get-testconfig test-name test-registry system-allowed #!key (force-create #f)) (let* ((test-path (hash-table-ref/default test-registry test-name (conc *toppath* "/tests/" test-name))) (test-configf (conc test-path "/testconfig")) (testexists (and (file-exists? test-configf)(file-read-access? test-configf))) (cache-path (tests:get-test-path-from-environment)) - (cache-exists (and cache-path (file-exists? (conc cache-path "/.testconfig")))) + (cache-exists (and cache-path + (not force-create) ;; if force-create then pretend there is no cache to read + (file-exists? (conc cache-path "/.testconfig")))) (cache-file (conc cache-path "/.testconfig")) (tcfg (if testexists (or (and cache-exists (handle-exceptions exn @@ -823,17 +825,17 @@ (lambda (a b) (> (mungepriority (tests:testqueue-get-priority (hash-table-ref test-records a))) (mungepriority (tests:testqueue-get-priority (hash-table-ref test-records b))))))) ;; (let ((dot-res (tests:run-dot (tests:tests->dot test-records) "plain"))) ;; (debug:print "dot-res=" dot-res)) - (let ((data (map cdr (filter - (lambda (x)(equal? "node" (car x))) - (map string-split (tests:easy-dot test-records "plain")))))) - (map car (sort data (lambda (a b) - (> (string->number (caddr a))(string->number (caddr b))))))) - )) - ;; (sort all-tests sort-fn1))) ;; avoid dealing with deleted tests, look at the hash table + ;; (let ((data (map cdr (filter + ;; (lambda (x)(equal? "node" (car x))) + ;; (map string-split (tests:easy-dot test-records "plain")))))) + ;; (map car (sort data (lambda (a b) + ;; (> (string->number (caddr a))(string->number (caddr b))))))) + ;; )) + (sort all-tests sort-fn1))) ;; avoid dealing with deleted tests, look at the hash table (define (tests:easy-dot test-records outtype) (let-values (((fd temp-path) (file-mkstemp (conc "/tmp/" (current-user-name) ".XXXXXX")))) (let ((all-testnames (hash-table-keys test-records)) (temp-port (open-output-file* fd)))