Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -743,17 +743,20 @@ (set! *configstatus* 'fulldata) (set! *toppath* (get-environment-variable "MT_RUN_AREA_HOME")) *toppath*) ;; we have all the info needed to fully process runconfigs and megatest.config (mtcachef - (let* ((first-pass (find-and-read-config ;; NB// sets MT_RUN_AREA_HOME as side effect - mtconfig - environ-patt: "env-override" - given-toppath: toppath - pathenvvar: "MT_RUN_AREA_HOME")) - (first-rundat (read-config (conc toppath "/runconfigs.config") *runconfigdat* #t - sections: sections))) + (let* ((first-pass (find-and-read-config ;; NB// sets MT_RUN_AREA_HOME as side effect + mtconfig + environ-patt: "env-override" + given-toppath: toppath + pathenvvar: "MT_RUN_AREA_HOME")) + (first-rundat (let ((toppath (if toppath + toppath + (car first-pass)))) + (read-config (conc toppath "/runconfigs.config") *runconfigdat* #t + sections: sections)))) (set! *runconfigdat* first-rundat) (if first-pass ;; (begin (set! *configdat* (car first-pass)) (set! *configinfo* first-pass) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -73,18 +73,25 @@ (set! envdat (append envdat (list (list "MT_RUN_AREA_HOME" toppath) (list "MT_RUNNAME" runname) (list "MT_TARGET" target)))) - ;; Now can read the runconfigs file + + ;; Now can read the runconfigs file -- can replace this with call to launch:setup? + ;; + ;; This block should be ok to remove - just keep the set of runconfig ;; - (set! runconfig (read-config (conc *toppath* "/runconfigs.config") #f #t sections: (list "default" target))) - (if (not (hash-table-ref/default runconfig (args:get-arg "-reqtarg") #f)) + (if (not (eq? *configstatus* 'fulldata)) (begin - (debug:print 0 "ERROR: [" (args:get-arg "-reqtarg") "] not found in " runconfigf) - (if db (sqlite3:finalize! db)) - (exit 1))) + (debug:print 0 "Processing runconfigs.config again...") + (set! runconfig (read-config (conc *toppath* "/runconfigs.config") #f #t sections: (list "default" target))) + (if (not (hash-table-ref/default runconfig (args:get-arg "-reqtarg") #f)) + (begin + (debug:print 0 "ERROR: [" (args:get-arg "-reqtarg") "] not found in " runconfigf) + (if db (sqlite3:finalize! db)) + (exit 1)))) + (set! runconfig *runconfigdat*)) ;; Now have runconfigs data loaded, set environment vars ;; Only now can we calculate the testpatt (set! testpatt (common:args-get-testpatt runconfig))