@@ -38,11 +38,34 @@ (declare (uses fsmod)) (use srfi-69) (module megatestmod - * + ( + common:get-disks + db:set-tests-state-status + db:set-state-status-and-roll-up-items + common:get-install-area + tests:get-all + common:use-cache? + + mt:lazy-read-test-config + common:get-full-test-name + tests:extend-test-patts + tests:get-itemmaps + tests:get-items + tests:get-global-waitons + tests:get-tests-search-path + tests:filter-test-names + common:args-get-testpatt + tests:filter-test-names-not-matched + common:args-get-runname + common:load-views-config + common:args-get-state + common:args-get-status + common:get-runconfig-targets + ) (import scheme) (cond-expand (chicken-4 @@ -197,34 +220,10 @@ (args:get-arg ":runname") (getenv "MT_RUNNAME")))) ;; (if res (set-environment-variable "MT_RUNNAME" res)) ;; not sure if this is a good idea. side effect and all ... res)) -(define (common:args-get-target #!key (split #f)(exit-if-bad #f)) - (let* ((keys (if (hash-table? *configdat*) (common:get-fields *configdat*) '())) - (numkeys (length keys)) - (target (or (args:get-arg "-reqtarg") - (args:get-arg "-target") - (getenv "MT_TARGET"))) - (tlist (if target (string-split target "/" #t) '())) - (valid (if target - (or (null? keys) ;; probably don't know our keys yet - (and (not (null? tlist)) - (eq? numkeys (length tlist)) - (null? (filter string-null? tlist)))) - #f))) - (if valid - (if split - tlist - target) - (if target - (begin - (debug:print-error 0 *default-log-port* "Invalid target, spaces or blanks not allowed \"" target "\", target should be: " (string-intersperse keys "/") ", have " tlist " for elements") - (if exit-if-bad (exit 1)) - #f) - #f)))) - ;;====================================================================== ;; looking only (at least for now) at the MT_ variables craft the full testname ;; (define (common:get-full-test-name) (if (getenv "MT_TEST_NAME") @@ -420,20 +419,10 @@ (with-output-to-file (conc pktsdir "/" uuid ".pkt") (lambda () (print pkt))))))))) -;;====================================================================== -;; Lookup a value in runconfigs based on -reqtarg or -target -;; -(define (runconfigs-get config var) - (let ((targ (common:args-get-target))) ;; (or (args:get-arg "-reqtarg")(args:get-arg "-target")(getenv "MT_TARGET")))) - (if targ - (or (configf:lookup config targ var) - (configf:lookup config "default" var)) - (configf:lookup config "default" var)))) - ;;====================================================================== ;; R U N S ;;====================================================================== ;; set tests with state currstate and status currstatus to newstate and newstatus