Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -243,11 +243,17 @@ ))))) ;; if there is a submegatest create a button to launch dashboard in that area ;; (define (submegatest-panel dbstruct keydat testdat runname testconfig) - (let* ((subarea (configf:lookup testconfig "setup" "submegatest")) + (let* ((test-run-dir (db:test-get-rundir testdat)) + (subrun-tconf-file (conc test-run-dir "/testconfig.subrun")) + (subrun-tconf (if (file-exists? subrun-tconf-file) + (configf:read-alist subrun-tconf-file) + (make-hash-table))) + (subarea (or (configf:lookup testconfig "setup" "submegatest") + (configf:lookup subrun-tconf "subrun" "runarea"))) (area-exists (and subarea (common:file-exists? subarea)))) ;; (debug:print-info 0 *default-log-port* "Megatest subarea=" subarea ", area-exists=" area-exists) (if subarea (iup:frame #:title "Megatest Run Info" ; #:expand "YES" Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -321,25 +321,30 @@ ;; 4. fix runname ;; 5. fix testpatt or calculate it from contour ;; 6. launch the run ;; 7. roll up the run result and or roll up the logpro processed result (if (configf:lookup testconfig "subrun" "runwait") ;; we use runwait as the flag that a subrun is requested - (let* ((runarea (configf:lookup testconfig "subrun" "runarea")) + (let* ((runarea (let ((ra (configf:lookup testconfig "subrun" "runarea"))) + (if ra ;; when runarea is not set we default to *toppath*. However + ra ;; we need to force the setting in the testconfig so it will + (begin ;; be preserved in the testconfig.subrun file + (configf:set-section-var testconfig "subrun" "runarea" *toppath*) + *toppath*)))) (passfail (configf:lookup testconfig "subrun" "passfail")) - (target (configf:lookup testconfig "subrun" "target")) - (runname (configf:lookup testconfig "subrun" "runname")) + (target (or (configf:lookup testconfig "subrun" "target") (get-environment-variable "MT_TARGET"))) + (runname (or (configf:lookup testconfig "subrun" "runname")(get-environment-variable "MT_RUNNAME"))) (contour (configf:lookup testconfig "subrun" "contour")) (testpatt (configf:lookup testconfig "subrun" "testpatt")) (mode-patt (configf:lookup testconfig "subrun" "mode-patt")) (tag-expr (configf:lookup testconfig "subrun" "tag-expr")) (run-wait (configf:lookup testconfig "subrun" "runwait")) (logpro (configf:lookup testconfig "subrun" "logpro")) (compact-stem (string-substitute "[/*]" "_" (conc target "-" runname "-" (or testpatt mode-patt tag-expr)))) (log-file (conc compact-stem ".log")) (mt-cmd (conc "megatest -run -target " target - " -runname " (or runname (get-environment-variable "MT_RUNNAME")) - (conc " -start-dir " (if runarea runarea *toppath*)) + " -runname " runname + (conc " -start-dir " runarea) ;; (if runarea runarea *toppath*)) (if testpatt (conc " -testpatt " testpatt) "") (if mode-patt (conc " -modepatt " mode-patt) "") (if tag-expr (conc " -tag-expr" tag-expr) "") (if (equal? run-wait "yes") " -run-wait " "") " -log " log-file)))