Index: genexample.scm ================================================================== --- genexample.scm +++ genexample.scm @@ -8,22 +8,22 @@ ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== (declare (unit genexample)) -(use posix) +(use posix regex) (define genexample:example-logpro #< 0 "Put description here" #/put pattern here/) - -;; You may need ignores to suppress false error or warning hits from the later expects -;; NOTE: Order is important here! -(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) -(expect:warning in "LogFileBody" = 0 "Any warning" #/warn/) -(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors + ;; You should have at least one expect:required. This ensures that your process ran + (expect:required in "LogFileBody" > 0 "Put description here" #/put pattern here/) + ;; + ;; You may need ignores to suppress false error or warning hits from the later expects + ;; NOTE: Order is important here! + (expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) + (expect:warning in "LogFileBody" = 0 "Any warning" #/warn/) + (expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors EOF ) (define genexample:example-script #< 2 - "-gen-megatest-test" + "-create-test" "-override-timeout" "-test-files" ;; -test-paths is for listing all "-load" ;; load and exectute a scheme file "-section" "-var" @@ -304,11 +304,11 @@ "-remove-runs" "-rebuild-db" "-cleanup-db" "-rollup" "-update-meta" - "-gen-megatest-area" + "-create-megatest-area" "-mark-incompletes" "-convert-to-norm" "-convert-to-old" "-import-megatest.db" @@ -759,11 +759,11 @@ (if (launch:setup) (let ((run-id (and (args:get-arg "-run-id") (string->number (args:get-arg "-run-id"))))) ;; (set! *fdb* (filedb:open-db (conc *toppath* "/db/paths.db"))) ;; if not list or kill then start a client (if appropriate) - (if (or (args-defined? "-h" "-version" "-gen-megatest-area" "-gen-megatest-test") + (if (or (args-defined? "-h" "-version" "-create-megatest-area" "-create-test") (eq? (length (hash-table-keys args:arg-hash)) 0)) (debug:print-info 1 *default-log-port* "Server connection not needed") (begin ;; (if run-id ;; (client:launch run-id) @@ -1829,17 +1829,17 @@ (begin (debug:print 0 *default-log-port* "Look at the dashboard for now") ;; (megatest-gui) (set! *didsomething* #t))) -(if (args:get-arg "-gen-megatest-area") +(if (args:get-arg "-create-megatest-area") (begin (genexample:mk-megatest.config) (set! *didsomething* #t))) -(if (args:get-arg "-gen-megatest-test") - (let ((testname (args:get-arg "-gen-megatest-test"))) +(if (args:get-arg "-create-test") + (let ((testname (args:get-arg "-create-test"))) (genexample:mk-megatest-test testname) (set! *didsomething* #t))) ;;====================================================================== ;; Update the database schema, clean up the db