Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -1817,26 +1817,27 @@ (begin (debug:print-error 0 *default-log-port* "MT_CMDINFO env var not set, -step must be called *inside* a megatest invoked environment!") (exit 5)) (let* ((cmdinfo (common:read-encoded-string (getenv "MT_CMDINFO"))) (transport (assoc/default 'transport cmdinfo)) - ;; (testpath (assoc/default 'testpath cmdinfo)) + (testpath (assoc/default 'testpath cmdinfo)) ;; the test source area (test-name (assoc/default 'test-name cmdinfo)) (runscript (assoc/default 'runscript cmdinfo)) (db-host (assoc/default 'db-host cmdinfo)) (run-id (assoc/default 'run-id cmdinfo)) (test-id (assoc/default 'test-id cmdinfo)) (itemdat (assoc/default 'itemdat cmdinfo)) - (work-area (assoc/default 'work-area cmdinfo)) + ;; (work-area (assoc/default 'work-area cmdinfo)) ;; the test run area, no longer available from cmdinfo (db #f) - (testpath #f)) + (work-area #f)) (if (not (launch:setup)) (begin (debug:print 0 *default-log-port* "Failed to setup, exiting") (exit 1))) - (set! testpath (db:test-get-rundir testdat)) - (change-directory testpath) + (let* ((testdat (rmt:get-test-info-by-id run-id test-id))) + (set! work-area (db:test-get-rundir testdat))) + (change-directory work-area) ;; why would this have ever been testpath? Makes no sense (if (and state status) (let ((comment (launch:load-logpro-dat run-id test-id step))) ;; (rmt:test-set-log! run-id test-id (conc stepname ".html")))) (rmt:teststep-set-status! run-id test-id step state status (or comment msg) logfile)) (begin @@ -1868,30 +1869,30 @@ (debug:print-error 0 *default-log-port* "MT_CMDINFO env var not set, commands -test-status, -runstep and -setlog must be called *inside* a megatest environment!") (exit 5)) (let* ((startingdir (current-directory)) (cmdinfo (common:read-encoded-string (getenv "MT_CMDINFO"))) (transport (assoc/default 'transport cmdinfo)) - ;; (testpath (assoc/default 'testpath cmdinfo)) + (testpath (assoc/default 'testpath cmdinfo)) ;; source area for test files (test-name (assoc/default 'test-name cmdinfo)) (runscript (assoc/default 'runscript cmdinfo)) (db-host (assoc/default 'db-host cmdinfo)) (run-id (assoc/default 'run-id cmdinfo)) (test-id (assoc/default 'test-id cmdinfo)) (itemdat (assoc/default 'itemdat cmdinfo)) - (work-area (assoc/default 'work-area cmdinfo)) + ;; (work-area (assoc/default 'work-area cmdinfo)) ;; the area where the test runs, no longer available from cmdinfo (db #f) ;; (open-db)) (state (args:get-arg ":state")) (status (args:get-arg ":status")) (stepname (args:get-arg "-step")) - (testdat (rmt:get-test-info-by-id run-id test-id)) - (testpath #f)) ;; fill in missing data below + (work-area #f)) (if (not (launch:setup)) (begin (debug:print 0 *default-log-port* "Failed to setup, exiting") (exit 1))) - (set! testpath (db:test-get-rundir testdat)) (if (args:get-arg "-runstep")(debug:print-info 1 *default-log-port* "Running -runstep, first change to directory " work-area)) + (let* ((testdat (rmt:get-test-info-by-id run-id test-id))) + (set! work-area (db:test-get-rundir testdat))) (change-directory work-area) ;; can setup as client for server mode now ;; (client:setup) (if (args:get-arg "-load-test-data")