@@ -195,10 +195,12 @@ (include "diff-report.scm") (include "ods.scm") (define *usage-log-file* #f) ;; put path to file for logging usage in this var in the ~/.megatestrc file (define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file + +(set! *toppath* (get-environment-variable "PWD")) ;;====================================================================== ;; Test commands (i.e. for use inside tests) ;;====================================================================== @@ -282,11 +284,11 @@ (let* ((config-reruns (let ((x (configf:lookup *configdat* "setup" "reruns"))) (if x (string->number x) #f))) (rerun-cnt (if config-reruns config-reruns 1))) - + (debug:print 0 *default-log-port* "handle-run-requests *toppath* = " *toppath*) (runs:run-tests target runname #f ;; (common:args-get-testpatt #f) ;; (or (args:get-arg "-testpatt") ;; "%") @@ -758,15 +760,20 @@ ;; (if (args:get-arg "-start-dir") (if (common:file-exists? (args:get-arg "-start-dir")) (let ((fullpath (common:real-path (args:get-arg "-start-dir")))) (set-environment-variable! "PWD" fullpath) - (change-directory fullpath)) + (change-directory fullpath) + (set! *toppath* fullpath)) (begin (debug:print-error 0 *default-log-port* "non-existant start dir " (args:get-arg "-start-dir") " specified, exiting.") (exit 1)))) + + (set! *toppath* (get-environment-variable "PWD")) + + ;; immediately set MT_TARGET if -reqtarg or -target are available ;; (let ((targ (or (args:get-arg "-reqtarg")(args:get-arg "-target")))) (if targ (begin