Index: docs/manual/megatest_manual.html ================================================================== --- docs/manual/megatest_manual.html +++ docs/manual/megatest_manual.html @@ -1415,15 +1415,35 @@
[items]
 A a b c
 B d e f

Then the config file would effectively appear to contain an items section -exactly like the output from the script. This is extremely useful when -dynamically creating items, itemstables and other config structures. You can -see the expansion of the call by looking in the cached files (look in your -linktree for megatest.config and runconfigs.config cache files and in your -test run areas for the expanded and cached testconfig).

+exactly like the output from the script. This is useful when dynamically +creating items, itemstables and other config structures. You can see the +expansion of the call by looking in the cached files (look in your linktree +for megatest.config and runconfigs.config cache files and in your test run +areas for the expanded and cached testconfig).

+

Wildcards and regexes in Targets

+
+
+
[a/2/b]
+VAR1 VAL1
+
+[a/%/b]
+VAR1 VAL2
+
+

Will result in:

+
+
+
[a/2/b]
+VAR1 VAL2
+
+

Can use either wildcard of "%" or a regular expression:

+
+
+
[/abc.*def/]
+

Disk Space Checks

Some parameters you can put in the [setup] section of megatest.config:

@@ -1923,10 +1943,78 @@ Note There is a trailing space after the --
+

There are a number of environment variables available to the trigger script +but since triggers can be called in various contexts not all variables are +available at all times. The trigger script should check for the variable and +fail gracefully if it doesn’t exist.

+ + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4. Environment variables visible to the trigger script
Variable Purpose

MT_TEST_RUN_DIR

The directory where Megatest ran this test

MT_CMDINFO

Encoded command data for the test

MT_DEBUG_MODE

Used to pass the debug mode to nested calls to Megatest

MT_RUN_AREA_HOME

Megatest home area

MT_TESTSUITENAME

The name of this testsuite or area

MT_TEST_NAME

The name of this test

MT_ITEM_INFO

The variable and values for the test item

MT_MEGATEST

Which Megatest binary is being used by this area

MT_TARGET

The target variable values, separated by /

MT_LINKTREE

The base of the link tree where all run tests can be found

MT_ITEMPATH

The values of the item path variables, separated by /

MT_RUNNAME

The name of the run

Override the Toplevel HTML File

Megatest generates a simple html file summary for top level tests of iterated tests. The generation can be overridden. NOTE: the output of @@ -2011,11 +2099,11 @@

These routines can be called from the megatest repl.

- + @@ -2063,10 +2151,10 @@

Index: docs/manual/reference.txt ================================================================== --- docs/manual/reference.txt +++ docs/manual/reference.txt @@ -67,11 +67,13 @@ VAR1 VAL2 ------------------------- Can use either wildcard of "%" or a regular expression: +------------------------- [/abc.*def/] +------------------------- Disk Space Checks ^^^^^^^^^^^^^^^^^ Some parameters you can put in the [setup] section of megatest.config: @@ -495,10 +497,33 @@ [triggers] COMPLETED/ xterm -e bash -s -- ----------------- NOTE: There is a trailing space after the -- + +There are a number of environment variables available to the trigger script +but since triggers can be called in various contexts not all variables are +available at all times. The trigger script should check for the variable and +fail gracefully if it doesn't exist. + +.Environment variables visible to the trigger script +[width="90%",cols="^,2m",frame="topbot",options="header"] +|====================== +|Variable | Purpose +| MT_TEST_RUN_DIR | The directory where Megatest ran this test +| MT_CMDINFO | Encoded command data for the test +| MT_DEBUG_MODE | Used to pass the debug mode to nested calls to Megatest +| MT_RUN_AREA_HOME | Megatest home area +| MT_TESTSUITENAME | The name of this testsuite or area +| MT_TEST_NAME | The name of this test +| MT_ITEM_INFO | The variable and values for the test item +| MT_MEGATEST | Which Megatest binary is being used by this area +| MT_TARGET | The target variable values, separated by '/' +| MT_LINKTREE | The base of the link tree where all run tests can be found +| MT_ITEMPATH | The values of the item path variables, separated by '/' +| MT_RUNNAME | The name of the run +|====================== Override the Toplevel HTML File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Table 4. API Keys Related CallsTable 5. API Keys Related Calls