Index: http-transport-inc.scm ================================================================== --- http-transport-inc.scm +++ http-transport-inc.scm @@ -631,11 +631,11 @@ "

Server Stats

" (http-transport:stats-table) "
" (http-transport:runs linkpath) "
" - (http-transport:run-stats) + ;; (http-transport:run-stats) "" ))) (define (http-transport:stats-table) (mutex-lock! *heartbeat-mutex*) @@ -666,14 +666,14 @@ (map (lambda (p) (conc "" p "
")) files)) " "))) -(define (http-transport:run-stats) +#;(define (http-transport:run-stats) (let ((stats (open-run-close db:get-running-stats #f))) (conc "" (string-intersperse (map (lambda (stat) (conc "")) stats) " ") "
" (car stat) "" (cadr stat) "
"))) Index: launch-inc.scm ================================================================== --- launch-inc.scm +++ launch-inc.scm @@ -1691,11 +1691,11 @@ ;; - it it's run directory correct for the test ;; - is there a controlling mtest (maybe stuck) ;; 2. if recovery is needed watch pid ;; - when it exits take the exit code and do the needful ;; - (let* ((pid (rmt:test-get-top-process-id run-id test-id)) + (let* ((pid (rmt:test-get-top-process-pid run-id test-id)) (psres (with-input-from-pipe (conc "ps -F -u " (current-user-name) " | grep -E '" pid " ' | grep -v 'grep -E " pid "'") (lambda () (read-line)))) (rundir (if (string? psres) ;; real process owned by user Index: process-inc.scm ================================================================== --- process-inc.scm +++ process-inc.scm @@ -96,11 +96,11 @@ (if (not (eof-object? curr)) (loop (read-line fh) (append result (list (proc curr)))) (begin (close-input-port fh) - (close-input-port fhe) + ;;(close-input-port fhe) (close-output-port fho) result)))))) (define (process:cmd-run-proc-each-line-alt cmd proc) (let* ((fh (open-input-pipe cmd)) Index: runconfig-inc.scm ================================================================== --- runconfig-inc.scm +++ runconfig-inc.scm @@ -153,5 +153,49 @@ (let ((newres (append (string-split hed " ") res))) (runconfig:expand-target newres)) (if (string-index hed ",") ;; this is a multi-target where one or more parts are comma separated |# + +;; cache the runconfigs in $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME/.runconfig +;; +(define (full-runconfigs-read) +;; in the envprocessing branch the below code replaces the further below code +;; (if (eq? *configstatus* 'fulldata) +;; *runconfigdat* +;; (begin +;; (launch:setup) +;; *runconfigdat*))) + + (let* ((rundir (if (and (getenv "MT_LINKTREE")(getenv "MT_TARGET")(getenv "MT_RUNNAME")) + (conc (getenv "MT_LINKTREE") "/" (getenv "MT_TARGET") "/" (getenv "MT_RUNNAME")) + #f)) + (cfgf (if rundir (conc rundir "/.runconfig." megatest-version "-" megatest-fossil-hash) #f))) + (if (and cfgf + (common:file-exists? cfgf) + (file-write-access? cfgf) + (common:use-cache?)) + (configf:read-alist cfgf) + (let* ((keys (rmt:get-keys)) + (target (common:args-get-target)) + (key-vals (if target (keys:target->keyval keys target) #f)) + (sections (if target (list "default" target) #f)) + (data (begin + (setenv "MT_RUN_AREA_HOME" *toppath*) + (if key-vals + (for-each (lambda (kt) + (setenv (car kt) (cadr kt))) + key-vals)) + ;; (read-config (conc *toppath* "/runconfigs.config") #f #t sections: sections)))) + (runconfig:read (conc *toppath* "/runconfigs.config") target #f)))) + (if (and rundir ;; have all needed variabless + (directory-exists? rundir) + (file-write-access? rundir)) + (begin + (if (not (common:in-running-test?)) + (configf:write-alist data cfgf)) + ;; force re-read of megatest.config - this resolves circular references between megatest.config + (launch:setup force-reread: #t) + ;; (launch:cache-config) ;; there are two independent config cache locations, turning this one off for now. MRW. + )) ;; we can safely cache megatest.config since we have a valid runconfig + data)))) +