📄 readme
字号:
TSTBLDBASE=/net/myhost/export/scratch1/myname/monet/$OSVER TSTTRGBASE=/net/myhost/export/scratch1/myname/monet/$OSVER either by setting the repective environment variables or by using the respective command line options to Mtest.py (see above).- Each test is identified by its name and its directory path relative to TSTSRCBASE, but without the trailing "/Tests".- Running one or several tests is done by simply calling + "Mtest.py <names...>" to run tests <names...> in a) ".", if "." is a "Tests"-directory and there is an "All"-file in "." b) "./Tests", if "./Tests/All" exists + "Mtest.py -r" to run all tests found in any subdirectory of "." If Mtest.py is not called in (a subdirectory of) $TSTSRCBASE, Mtest.py changes ("cd's") to $TSTSRCBASE before starting its work. For more details call "Mtest.py --help".- Environment variables: + Mtest.py doesn't need any special environment variables to be set. + However, the following environment variables can be set to overrule the default settings: name default description ---- ------- ----------- MONETDB_SOURCE (where you checked out Monet) base of Monet's source tree MONETDB_BUILD (where you called configure & make) base of extracted source tree MONETDB_PREFIX (where you installed Monet to) base of Monet distribution TSTSRCBASE $MONETDB_SOURCE base of test source tree TSTBLDBASE $MONETDB_BUILD base of extracted test tree TSTTRGBASE $MONETDB_PREFIX base for test output MAPICLIENT MapiClient -lmil mapi-client program `) SQLCLIENT MapiClient -lsql sql-client program `) SQLDUMP msqldump sql-dump program `) XQUERYCLIENT MapiClient -lxquery -oxml xquery-client program `) `) Alternative Mapi-, SQL-, & XQUERY- client programs need to accept (or ignore) "--config=", "--host=", & "--port=" options. The following variables are currently still used legacy, but they will disappear soon... MONETDB_MOD_PATH $MONETDB_PREFIX/lib(64);MONETDB_PREFIX/lib(64)/Monet The setting of all these environment variables maybe overruled by commandline options with the same names, e.g., "--MAPICLIENT=MapiClient.py". NOTE: All paths must be given as ABSOLUTE PHYSICAL PATHS (see "IMPORTANT NOTE" above). + Further environment variables that Mtest.py exports (to be used in test scripts) are: name description ---- ----------- HOST hostname OS `uname` OSVER `uname``uname -r` MTIMEOUT "Mtimeout -timeout $TIMEOUT" MDIFF "$MTIMEOUT Mdiff" MSERVER "$MTIMEOUT Mserver --config=$MONETDB_CONF --debug=$GDK_DEBUG $setMONETDB_MOD_PATH $setGDK_DBFARM $setSQL_LOGDIR $setXQUERY_LOGDIR --set mapi_port=$MAPIPORT --set xrpc_port=$XRPCPORT --set monet_prompt= --trace" MAPI_CLIENT "$MTIMEOUT $MAPICLIENT --config=$MONETDB_CONF --host=$HOST --port=$MAPIPORT" SQL_CLIENT "$MTIMEOUT $SQLCLIENT -u monetdb -P monetdb --host=$HOST --port=$MAPIPORT --trace" SQL_DUMP "$MTIMEOUT $SQLDUMP -u monetdb -P monetdb --host=$HOST --port=$MAPIPORT --trace" XQUERY_CLIENT "$MTIMEOUT $XQUERYCLIENT -u monetdb -P monetdb --host=$HOST --port=$MAPIPORT" MAPIPORT the MAPI port (random number between 30000 and 39999) XRPCPORT the XRPC port (random number between 40000 and 49999) TST name of the current test TSTDB name of default test database, unique for each directory TSTDIR current test directory without $TSTSRCBASE/ & /Tests TSTSRCDIR $TSTSRCBASE/$TSTDIR/Tests TSTBLDDIR $TSTBLDBASE/$TSTDIR/Tests TSTTRGDIR $TSTTRGBASE/mTests/$TSTDIR MONETDB_CONF location of MonetDB.conf (default: $MONETDB_PREFIX/etc/MonetDB.conf) SQL_LOGDIR as read from $MONETDB_CONF or set by --sql_logdir=<path> XQUERY_LOGDIR as read from $MONETDB_CONF or set by --xquery_logdir=<path> GDK_DBFARM as read from $MONETDB_CONF or set by --dbfarm=<path> GDK_DEBUG debug bitmask for Mserver (default: 10) MONETDB_MOD_PATH new module search path of Mserver (if set via --monet_mod_path=<pathlist>) setMONETDB_MOD_PATH "--set monet_mod_path=$MONETDB_MOD_PATH" (if --monet_mod_path=<pathlist> is used) setGDK_DBFARM "--set gdk_dbfarm=$GDK_DBFARM" (if --dbfarm=<path> is used) setSQL_LOGDIR "--set sql_logdir=$SQL_LOGDIR" (if --sql_logdir=<path> is used) setXQUERY_LOGDIR "--set xquery_logdir=$XQUERY_LOGDIR" (if --xquery_logdir=<path> is used)- For each directory, Mtest.py creates a database $TSTDB in $GDK_DBFARM and the respective transaction-log directories $TSTDB in $SQL_LOGDIR and $XQUERY_LOGDIR before running any test.- A test is skipped (i.e. not executed), if $TST.modules exists and contains modules that are not available, or if $TST.BATs exists and contains BATs that are not available in the current database $TSTDB.- While executing test "$TSTSRCDIR/TST", Mtest.py uses $TSTTRGDIR as working directory; for convenience, all files "$TSTSRCDIR/TST*" are copied to $TSTTRGDIR.- Mtest.py stores the output of test "$TSTSRCDIR/TST" in $TSTTRGDIR/TST.test.{out,err} and checks it against $TSTSRCDIR/TST.stable.{out,err}. If system specific stable output files ($TSTSRCDIR/TST.stable.{out,err}[.($OS|$OSVER)][.(64|32)bit][.oid(32|64)][.Five][.STATIC]) exist, the most specific stable output is used. Mtest.py stores the respective Mdiff results in $TSTTRGDIR/TST.{out,err}.diff.html. For each test directory, a common entry point to the test results is created as $TSTTRGDIR/.index.html. For the whole test run, a global entry point to the test results is created as $TSTTRGBASE/mTests/index.html. - Mfilter.py is used to filter out variable date form the test output to avoid no-error differences when running Mdiff. Mfilter.py prefixes all lines enclosed in two line containing only "#~BeginVariableOutput~#" and "#~EndVariableOutput~#", respectively, with "#~". These lines are then ignored during Mdiff. MIL Example: printf("#~BeginVariableOutput~#\n"); cpu.print(); printf("#~EndVariableOutput~#\n);- A tool Mapprove.py is provided to copy the recent output from $TSTTRGDIR/TST.test.{out,err} to $TSTSRCDIR/TST.stable.{out,err}. Lines starting with a '!' (i.e. error messages) are eliminated during copying. Of course, $TSTTRGDIR/TST.test.{out,err} have to be checked and claimed correct before being approved! See "Mapprove.py -?" for command-line options.- A development session is then supposed to proceed as follows: (assuming TSTSRCBASE=$MONETDB_SOURCE and TSTBLDBASE=$MONETDB_BUILD) cd $TSTSRCBASE run cvs update loop loop loop # write & compile your code cd $TSTSRCBASE/$TSTDIR edit source cd $TSTBLDBASE/$TSTDIR [g]make [g]make install endloop loop # write, adapt, run your tests ... cd $TSTSRCBASE/$TSTDIR edit/create Tests/All edit/create Tests/<names...>.* run Mtest.py <names...> # ... and check their results check $TSTTRGDIR/<names...>.test.{out,err} $TSTTRGDIR/<names...>.{out,err}.diff.html (cf. $TSTTRGBASE/mTests/index.html) endloop # approve new/modified correct output of your tests run Mapprove.py <names...> endloop # run all Monet tests... cd $TSTSRCBASE run Mtest.py -r # ... and check their results check $TSTTRGBASE/mTests/index.html endloop # approve "intended" impact of your changes on other tests' output run Mapprove.py <names...> # checkin all correct new stuff to cvs run cvs ci- Mprofile.py: Mprofile.py works just like Mtest.py, only it uses "prof.py" to add some mprof-commands to all TST*.*mil* files before actually running the test. Thus, profiling information is collected. prof.py reads a list of mil commands from a .Mprofile-commands.lst file (specified by Mprofile.py's "--CMDLST" parameter) and wraps all occurances of these commands in a mil script in pmB("<command>"); <command>; pmE("<command>"); Further, prof.py adds a "pmSummary();" at the end of the mil script.--| Stefan Manegold | mailto:Stefan.Manegold@cwi.nl || CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ || 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 || The Netherlands | Fax : +31 (20) 592-4312 |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -