Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -813,18 +813,21 @@ (define (common:args-get-status) (or (args:get-arg "-status")(args:get-arg ":status"))) (define (common:args-get-testpatt rconf) - (let* ((rtestpatt (if rconf (runconfigs-get rconf "TESTPATT") #f)) + (let* ((tags-testpatt (if (args:get-arg "-tagexpr") (string-join (runs:get-tests-matching-tags (args:get-arg "-tagexpr")) ",") #f)) + (testpatt-key (if (args:get-arg "-mode") (args:get-arg "-mode") "TESTPATT")) + (rtestpatt (if rconf (runconfigs-get rconf testpatt-key) #f)) (args-testpatt (or (args:get-arg "-testpatt") (args:get-arg "-runtests") "%")) - (testpatt (or (and (equal? args-testpatt "%") + (testpatt (or tags-testpatt + (and (equal? args-testpatt "%") rtestpatt) args-testpatt))) - (if rtestpatt (debug:print-info 0 *default-log-port* "TESTPATT from runconfigs: " rtestpatt)) + (if rtestpatt (debug:print-info 0 *default-log-port* "testpatt defined in "testpatt-key" from runconfigs: " rtestpatt)) testpatt)) (define (common:get-linktree) (or (getenv "MT_LINKTREE") (if *configdat* Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -93,10 +93,12 @@ -reqtarg key1/key2/... : run for key1, key2, etc. but key1/key2 must be in runconfig -testpatt patt1/patt2,patt3/... : % is wildcard -runname : required, name for this particular test run -state : Applies to runs, tests or steps depending on context -status : Applies to runs, tests or steps depending on context + -mode key : load testpatt from in runconfigs instead of default TESTPATT + -tagexpr tag1,tag2%,.. : select tests with tags matching expression Test helpers (for use inside tests) -step stepname -test-status : set the state and status of a test (use :state and :status) -setlog logfname : set the path/filename to the final log relative to the test @@ -209,11 +211,13 @@ ":state" "-state" ":status" "-status" "-list-runs" - "-testpatt" + "-testpatt" + "-mode" + "-tagexpr" "-itempatt" "-setlog" "-set-toplog" "-runstep" "-logpro"