@@ -580,15 +580,15 @@ ":state" "-state" ":status" "-status" "-list-runs" - "-testdata-csv" + "-testdata-csv" "-testpatt" - "--modepatt" - "-modepatt" - "-tagexpr" + "--modepatt" + "-modepatt" + "-tagexpr" "-itempatt" "-setlog" "-set-toplog" "-runstep" "-logpro" @@ -597,12 +597,12 @@ "-days" "-rename-run" "-to" "-dest" - "-source" - "-time-stamp" + "-source" + "-time-stamp" ;; values and messages ":category" ":variable" ":value" ":expected" @@ -609,17 +609,18 @@ ":tol" ":units" ;; misc "-start-dir" - "-run-patt" - "-target-patt" + "-run-patt" + "-target-patt" "-contour" - "-area-tag" - "-area" + "-area-tag" + "-area" "-run-tag" "-server" + "-db" ;; file name for setting up a server "-adjutant" "-transport" "-port" "-extract-ods" "-pathmod" @@ -626,13 +627,13 @@ "-env2file" "-envcap" "-envdelta" "-setvars" "-set-state-status" - - ;; move runs stuff here - "-remove-keep" + + ;; move runs stuff here + "-remove-keep" "-set-run-status" "-age" ;; archive "-archive" @@ -654,26 +655,26 @@ "-run-id" "-ping" "-refdb2dat" "-o" "-log" - "-sync-log" + "-sync-log" "-since" "-fields" "-recover-test" ;; run-id,test-id - used internally to recover a test stuck in RUNNING state "-sort" "-target-db" "-source-db" "-prefix-target" - "-src-target" - "-src-runname" - "-diff-email" + "-src-target" + "-src-runname" + "-diff-email" "-sync-to" "-pgsync" "-kill-wait" ;; wait this long before removing test (default is 10 sec) - "-diff-html" + "-diff-html" ;; wizards, area capture, setup new ... "-extract-skeleton" ) (list "-h" "-help" "--help" @@ -704,11 +705,11 @@ "-repl" "-lock" "-unlock" "-list-servers" "-kill-servers" - "-run-wait" ;; wait on a run to complete (i.e. no RUNNING) + "-run-wait" ;; wait on a run to complete (i.e. no RUNNING) "-one-pass" ;; "-local" ;; run some commands using local db access "-generate-html" "-generate-html-structure" "-list-run-time" @@ -1139,15 +1140,17 @@ ;;====================================================================== ;; Server? Start up here. ;; (if (args:get-arg "-server") - (let ((tl (launch:setup)) - (transport-type (string->symbol (or (args:get-arg "-transport") "http")))) - (server:launch 0 transport-type) - (set! *didsomething* #t))) - + (if (not (args:get-arg "-db")) + (debug:print 0 *default-log-port* "ERROR: -db required to start server") + (let ((tl (launch:setup)) + (dbname (args:get-arg "-db"))) ;; transport-type (string->symbol (or (args:get-arg "-transport") "http")))) + (server:launch dbname) + (set! *didsomething* #t)))) + ;; The adjutant is a bit different, it does NOT run (launch:setup) as it is not necessarily tied to ;; a specific Megatest area. Detail are being hashed out and this may change. ;; (if (args:get-arg "-adjutant") (begin