@@ -104,11 +104,15 @@ (set-run-config-vars db run-id) ;; environment overrides are done *before* the remaining critical envars. (alist->env-vars env-ovrd) (set-megatest-env-vars db run-id) (set-item-env-vars itemdat) - (save-environment-as-files "megatest") + (save-environment-as-files "megatest" + flst: '("DISPLAY") + overrides: (if (config-lookup *configdat* "setup" "homedir") + (list (list "HOME" (config-lookup *configdat* "setup" "homedir")) + (list (list "HOME" work-area))))) (test-set-meta-info db run-id test-name itemdat) (test-set-status! db test-id "REMOTEHOSTSTART" "n/a" (args:get-arg "-m") #f) (if (args:get-arg "-xterm") (set! fullrunscript "xterm") (if (and fullrunscript (not (file-execute-access? fullrunscript))) @@ -354,10 +358,17 @@ (set! *configdat* (if (car *configinfo*)(car *configinfo*) #f)) (set! *toppath* (if (car *configinfo*)(cadr *configinfo*) #f)) (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.")) + ;; here we extract the path to the megatest executable and append it to the path + (let ((path (pathname-directory (car (argv))))) + (if path + (setenv "PATH" (conc + (get-environment-variable "PATH") + ":" + (posix-extras#resolve-pathname path))))) *toppath*) (define (get-best-disk confdat) (let* ((disks (hash-table-ref/default confdat "disks" #f)) (best #f)