Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -81,11 +81,11 @@ fields category,variable,value,comment Queries -list-runs patt : list runs matching pattern \"patt\", % is the wildcard -showkeys : show the keys used in this megatest setup - -test-path targpatt : get the most recent test path/file matching targpatt e.g. %/%... + -test-files targpatt : get the most recent test path/file matching targpatt e.g. %/%... returns list sorted by age ascending, see examples below -test-paths : get the test paths matching target, runname, item and test patterns. Misc @@ -108,12 +108,12 @@ -gen-megatest-area : create a skeleton megatest area. You will be prompted for paths -gen-megatest-test : create a skeleton megatest test. You will be prompted for info Examples -# Get test path, the '.' is required, could use '*' or a specific path/file -megatest -test-path . -target ubuntu/n%/no% :runname w49% -testpatt test_mt% +# Get test path, use '.' to get a single path or a specific path/file pattern +megatest -test-files 'logs/*.log' -target ubuntu/n%/no% :runname w49% -testpatt test_mt% Called as " (string-intersperse (argv) " "))) ;; -gui : start a gui interface ;; -config fname : override the runconfig file with fname @@ -159,11 +159,11 @@ "-setvars" "-set-state-status" "-debug" ;; for *verbosity* > 2 "-gen-megatest-test" "-override-timeout" - "-test-path" ;; -test-paths is for listing all + "-test-files" ;; -test-paths is for listing all ) (list "-h" "-force" "-xterm" "-showkeys" @@ -453,11 +453,11 @@ ;;====================================================================== ;; Get paths to tests ;;====================================================================== ;; Get test paths matching target, runname, testpatt, and itempatt -(if (or (args:get-arg "-test-path")(args:get-arg "-test-paths")) +(if (or (args:get-arg "-test-files")(args:get-arg "-test-paths")) ;; if we are in a test use the MT_CMDINFO data (if (getenv "MT_CMDINFO") (let* ((startingdir (current-directory)) (cmdinfo (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO"))))) (testpath (assoc/default 'testpath cmdinfo)) @@ -476,30 +476,30 @@ (begin (debug:print 0 "ERROR: -target is required.") (exit 1))) (if (not (setup-for-run)) (begin - (debug:print 0 "Failed to setup, giving up on -test-path(s), exiting") + (debug:print 0 "Failed to setup, giving up on -test-paths or -test-files, exiting") (exit 1))) (set! db (open-db)) (if (not (args:get-arg "-server")) (server:client-setup db)) (let* ((itempatt (args:get-arg "-itempatt")) (keys (rdb:get-keys db)) (keynames (map key:get-fieldname keys)) - (paths (rdb:test-get-paths-matching db keynames target (args:get-arg "-test-path")))) + (paths (rdb:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) (set! *didsomething* #t) (for-each (lambda (path) (print path)) paths))) ;; else do a general-run-call (general-run-call - "-test-path" + "-test-files" "Get paths to test" (lambda (db target runname keys keynames keyvallst) (let* ((itempatt (args:get-arg "-itempatt")) - (paths (rdb:test-get-paths-matching db keynames target (args:get-arg "-test-path")))) + (paths (rdb:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) (for-each (lambda (path) (print path)) paths)))))) ;;======================================================================