@@ -458,15 +458,11 @@ targets) (set! *didsomething* #t))) (define (full-runconfigs-read) (let* ((keys (cdb:remote-run db:get-keys #f)) - (target (if (args:get-arg "-reqtarg") - (args:get-arg "-reqtarg") - (if (args:get-arg "-target") - (args:get-arg "-target") - #f))) + (target (common:args-get-target)) (key-vals (if target (keys:target->keyval keys target) #f)) (sections (if target (list "default" target) #f)) (data (begin (setenv "MT_RUN_AREA_HOME" *toppath*) (if key-vals @@ -522,12 +518,11 @@ ;; since several actions can be specified on the command line the removal ;; is done first (define (operate-on action) (let* ((runrec (runs:runrec-make-record)) - (target (or (args:get-arg "-reqtarg") - (args:get-arg "-target")))) + (target (common:args-get-target))) (cond ((not target) (debug:print 0 "ERROR: Missing required parameter for " action ", you must specify -target or -reqtarg") (exit 1)) ((not (args:get-arg ":runname")) @@ -569,12 +564,13 @@ (args:get-arg "-get-run-status")) (general-run-call "-set-run-status" "set run status" (lambda (target runname keys keyvals) - (let* ((runsdat (cdb:remote-run db:get-runs-by-patt #f keys runname (or (args:get-arg "-target") - (args:get-arg "-reqtarg")) #f #f)) + (let* ((runsdat (cdb:remote-run db:get-runs-by-patt #f keys runname + (common:args-get-target) + #f #f)) (header (vector-ref runsdat 0)) (rows (vector-ref runsdat 1))) (if (null? rows) (begin (debug:print-info 0 "No matching run found.") @@ -597,12 +593,13 @@ (runpatt (args:get-arg "-list-runs")) (testpatt (if (args:get-arg "-testpatt") (args:get-arg "-testpatt") "%")) (keys (cdb:remote-run db:get-keys #f)) - (runsdat (cdb:remote-run db:get-runs-by-patt #f keys runpatt (or (args:get-arg "-target") - (args:get-arg "-reqtarg")) #f #f)) + (runsdat (cdb:remote-run db:get-runs-by-patt #f keys runpatt + (common:args-get-target) + #f #f)) ;; (cdb:remote-run db:get-runs #f runpatt #f #f '())) (runs (db:get-rows runsdat)) (header (db:get-header runsdat)) (db-targets (args:get-arg "-list-db-targets")) (seen (make-hash-table)))