@@ -20,38 +20,10 @@ (if *toppath* (setenv "MT_RUN_AREA_HOME" *toppath*) ;; to be deprecated (debug:print 0 "ERROR: failed to find the top path to your run setup.")) *toppath*) -(define (setup-env-defaults db fname run-id . already-seen) - (let* ((keys (get-keys db)) - (keyvals (get-key-vals db run-id)) - (thekey (string-intersperse (map (lambda (x)(if x x "-na-")) keyvals) "/")) - (confdat (read-config fname)) - (whatfound (make-hash-table)) - (sections (list "default" thekey))) - (debug:print 4 "Using key=\"" thekey "\"") - (for-each - (lambda (section) - (let ((section-dat (hash-table-ref/default confdat section #f))) - (if section-dat - (for-each - (lambda (envvar) - (hash-table-set! whatfound section (+ (hash-table-ref/default whatfound section 0) 1)) - (setenv envvar (cadr (assoc envvar section-dat)))) - (map car section-dat))))) - sections) - (if (and (not (null? already-seen)) - (not (car already-seen))) - (begin - (debug:print 2 "Key settings found in runconfig.config:") - (for-each (lambda (fullkey) - (debug:print 2 (format #f "~20a ~a\n" fullkey (hash-table-ref/default whatfound fullkey 0)))) - sections) - (debug:print 2 "---") - (set! *already-seen-runconfig-info* #t))))) - (define (get-best-disk confdat) (let* ((disks (hash-table-ref/default confdat "disks" #f)) (best #f) (bestsize 0)) (if disks @@ -92,12 +64,16 @@ (debug:print 2 "Setting up test run area") (debug:print 2 " - creating run area in " dfullp) (system (conc "mkdir -p " dfullp)) (debug:print 2 " - creating link from " dfullp "/" testname " to " lnkpath) (system (conc "mkdir -p " lnkpath)) - (if (file-exists? (conc lnkpath "/" testname)) - (system (conc "rm -f " lnkpath "/" testname))) + +;; I suspect this section was deleting test directories under some +;; wierd sitations + +;; (if (file-exists? (conc lnkpath "/" testname)) +;; (system (conc "rm -f " lnkpath "/" testname))) (system (conc "ln -sf " dfullp " " lnkpath "/" testname)) (if (directory? dfullp) (begin (let* ((cmd (conc "rsync -av" (if (> *verbosity* 1) "" "q") " " test-path "/ " dfullp "/")) (status (system cmd)))