@@ -1417,11 +1417,31 @@ <h3 id="_config_file_additional_features">Config File Additional Features</h3>
1417
1417
B d e f</ pre >
1418
1418
</ div > </ div >
1419
1419
< div class ="paragraph "> < p > Then the config file would effectively appear to contain an items section
1420
- exactly like the output from the script. This is extremely useful when
1421
- dynamically creating items, itemstables and other config structures. You can
1422
- see the expansion of the call by looking in the cached files (look in your
1423
- linktree for megatest.config and runconfigs.config cache files and in your
1424
- test run areas for the expanded and cached testconfig).</ p > </ div >
1420
+ exactly like the output from the script. This is useful when dynamically
1421
+ creating items, itemstables and other config structures. You can see the
1422
+ expansion of the call by looking in the cached files (look in your linktree
1423
+ for megatest.config and runconfigs.config cache files and in your test run
1424
+ areas for the expanded and cached testconfig).</ p > </ div >
1425
+ < div class ="paragraph "> < p > Wildcards and regexes in Targets</ p > </ div >
1426
+ < div class ="listingblock ">
1427
+ < div class ="content monospaced ">
1428
+ < pre > [a/2/b]
1429
+ VAR1 VAL1
1430
+
1431
+ [a/%/b]
1432
+ VAR1 VAL2</ pre >
1433
+ </ div > </ div >
1434
+ < div class ="paragraph "> < p > Will result in:</ p > </ div >
1435
+ < div class ="listingblock ">
1436
+ < div class ="content monospaced ">
1437
+ < pre > [a/2/b]
1438
+ VAR1 VAL2</ pre >
1439
+ </ div > </ div >
1440
+ < div class ="paragraph "> < p > Can use either wildcard of "%" or a regular expression:</ p > </ div >
1441
+ < div class ="listingblock ">
1442
+ < div class ="content monospaced ">
1443
+ < pre > [/abc.*def/]</ pre >
1444
+ </ div > </ div >
1425
1445
< div class ="sect3 ">
1426
1446
< h4 id ="_disk_space_checks "> Disk Space Checks</ h4 >
1427
1447
< div class ="paragraph "> < p > Some parameters you can put in the [setup] section of megatest.config:</ p > </ div >
@@ -1925,6 +1945,74 @@ <h3 id="_triggers">Triggers</h3>
1925
1945
< td class ="content "> There is a trailing space after the --</ td >
1926
1946
</ tr > </ table >
1927
1947
</ div >
1948
+ < div class ="paragraph "> < p > There are a number of environment variables available to the trigger script
1949
+ but since triggers can be called in various contexts not all variables are
1950
+ available at all times. The trigger script should check for the variable and
1951
+ fail gracefully if it doesn’t exist.</ p > </ div >
1952
+ < table class ="tableblock frame-topbot grid-all "
1953
+ style ="
1954
+ width:90%;
1955
+ ">
1956
+ < caption class ="title "> Table 4. Environment variables visible to the trigger script</ caption >
1957
+ < col style ="width:33%; ">
1958
+ < col style ="width:66%; ">
1959
+ < thead >
1960
+ < tr >
1961
+ < th class ="tableblock halign-center valign-top " > Variable </ th >
1962
+ < th class ="tableblock halign-left valign-top " > Purpose</ th >
1963
+ </ tr >
1964
+ </ thead >
1965
+ < tbody >
1966
+ < tr >
1967
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_TEST_RUN_DIR</ p > </ td >
1968
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The directory where Megatest ran this test</ p > </ td >
1969
+ </ tr >
1970
+ < tr >
1971
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_CMDINFO</ p > </ td >
1972
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> Encoded command data for the test</ p > </ td >
1973
+ </ tr >
1974
+ < tr >
1975
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_DEBUG_MODE</ p > </ td >
1976
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> Used to pass the debug mode to nested calls to Megatest</ p > </ td >
1977
+ </ tr >
1978
+ < tr >
1979
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_RUN_AREA_HOME</ p > </ td >
1980
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> Megatest home area</ p > </ td >
1981
+ </ tr >
1982
+ < tr >
1983
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_TESTSUITENAME</ p > </ td >
1984
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The name of this testsuite or area</ p > </ td >
1985
+ </ tr >
1986
+ < tr >
1987
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_TEST_NAME</ p > </ td >
1988
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The name of this test</ p > </ td >
1989
+ </ tr >
1990
+ < tr >
1991
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_ITEM_INFO</ p > </ td >
1992
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The variable and values for the test item</ p > </ td >
1993
+ </ tr >
1994
+ < tr >
1995
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_MEGATEST</ p > </ td >
1996
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> Which Megatest binary is being used by this area</ p > </ td >
1997
+ </ tr >
1998
+ < tr >
1999
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_TARGET</ p > </ td >
2000
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The target variable values, separated by < em > /</ em > </ p > </ td >
2001
+ </ tr >
2002
+ < tr >
2003
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_LINKTREE</ p > </ td >
2004
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The base of the link tree where all run tests can be found</ p > </ td >
2005
+ </ tr >
2006
+ < tr >
2007
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_ITEMPATH</ p > </ td >
2008
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The values of the item path variables, separated by < em > /</ em > </ p > </ td >
2009
+ </ tr >
2010
+ < tr >
2011
+ < td class ="tableblock halign-center valign-top " > < p class ="tableblock "> MT_RUNNAME</ p > </ td >
2012
+ < td class ="tableblock halign-left valign-top " > < p class ="tableblock monospaced "> The name of the run</ p > </ td >
2013
+ </ tr >
2014
+ </ tbody >
2015
+ </ table >
1928
2016
</ div >
1929
2017
< div class ="sect2 ">
1930
2018
< h3 id ="_override_the_toplevel_html_file "> Override the Toplevel HTML File</ h3 >
@@ -2013,7 +2101,7 @@ <h2 id="_programming_api">Programming API</h2>
2013
2101
style ="
2014
2102
width:70%;
2015
2103
">
2016
- < caption class ="title "> Table 4 . API Keys Related Calls</ caption >
2104
+ < caption class ="title "> Table 5 . API Keys Related Calls</ caption >
2017
2105
< col style ="width:14%; ">
2018
2106
< col style ="width:28%; ">
2019
2107
< col style ="width:28%; ">
@@ -2065,7 +2153,7 @@ <h2 id="_example_index">Example Index</h2>
2065
2153
< div id ="footer ">
2066
2154
< div id ="footer-text ">
2067
2155
Version 1.0< br >
2068
- Last updated 2016-12 -12 13:03:08 PST
2156
+ Last updated 2017-04 -12 13:34:13 PDT
2069
2157
</ div >
2070
2158
</ div >
2071
2159
</ body >
0 commit comments