Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -449,11 +449,12 @@ (if rtestpatt (debug:print-info 0 "TESTPATT from runconfigs: " rtestpatt)) testpatt)) (define (common:args-get-runname) (or (args:get-arg "-runname") - (args:get-arg ":runname"))) + (args:get-arg ":runname") + (getenv "MT_RUNNAME"))) (define (common:args-get-target #!key (split #f)) (let* ((keys (keys:config-get-fields *configdat*)) (numkeys (length keys)) (target (if (args:get-arg "-reqtarg") Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -239,10 +239,11 @@ test1-older) (if same-time (string>? test-name1 test-name2) test1-older)))) +;; create a virtual table of all the tests ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) (define (update-rundat runnamepatt numruns testnamepatt keypatts) (let* ((referenced-run-ids '()) (allruns (if *useserver* (rmt:get-runs runnamepatt numruns *start-run-offset* keypatts) Index: docs/manual/Makefile ================================================================== --- docs/manual/Makefile +++ docs/manual/Makefile @@ -1,8 +1,8 @@ ASCPATH = $(shell which asciidoc) -EXEPATH = $(shell realpath $(ASCPATH)) +EXEPATH = $(shell readlink -f $(ASCPATH)) BINPATH = $(shell dirname $(EXEPATH)) DISPATH = $(shell dirname $(BINPATH)) # broad_goals.csv needed_features.csv : tables/*.dat # ./refdb2csv tables Index: docs/manual/megatest_manual.html ================================================================== --- docs/manual/megatest_manual.html +++ docs/manual/megatest_manual.html @@ -1177,17 +1177,15 @@
[requirements]
# A normal waiton waits for the prior tests to be COMPLETED @@ -1218,10 +1216,25 @@[requirements] mode itemmatch
Override variables before starting the test. Can include files (perhaps generated by megatest -envdelta or similar).
[pre-launch-env-vars] +VAR1 value1 + +# Get some generated settings +[include ../generated-vars.config] + +# Use this trick to unset variables +#{scheme (unsetenv "FOOBAR")}+
For cases were the dependent test has a similar but not identical itempath to the downstream test an itemmap can allow for itemmatch @@ -1291,11 +1304,11 @@
[requirements] waiton A B [itemmap] A (\d+)/aa aa/\1 -B (\d+)/bb bb/\1+B (\d+)/bb
[requirements] @@ -1317,18 +1330,19 @@[requirements] # With a toplevel test you may wish to generate your list # of tests to run dynamically # -# waiton #{shell get-valid-tests-to-run.sh}+waiton #{shell get-valid-tests-to-run.sh}
runtimelim 1h 2m 3s # this will automatically kill the test if it runs for more than 1h 2m and 3s+
[requirements] +runtimelim 1h 2m 3s # this will automatically kill the test if it runs for more than 1h 2m and 3s
A test with a skip section will conditional skip running.
It is often necessary to capture and or manipulate environment +variables. Megatest has some facilities built in to help.
# capture the current enviroment into a db called envdat.db under +# the context "before" +megatest -envcap before + +# capture the current environment into a db called startup.db with +# context "after" +megatest -envcap after startup.db + +# write the diff from before to after +megatest -envdelta before-after -dumpmode bash+
Dump modes include bash, csh and config. You can include config data +into megatest.config or runconfigs.config.
megatest -envcap original +# do some stuff here +megatest -envcap munged +megatest -envdelta original-munged -dumpmode ini -o modified.config+
Then in runconfigs.config
cat testconfig + +[pre-launch-env-vars] +[include modified.config]+