Skip to content
Gijs Molenaar edited this page Feb 13, 2014 · 4 revisions

Basic invocation

  • {{{ $ trut [trutfiles...] }}}

If you run trut without specifying any filenames, it will search all directories under the current one for files named TRUT, and execute the tests contained therein.

To run trut with only a specific set of TRUT files, specify these on the command line.

The exit code of trut is 0 if all the tests succeed, or non-0 on any failure.

-h: Help

trut -h or trut --help will print a short help text.

-jN: Parallel jobs

This is akin to the -j option of GNU make. On a multi-core machine, you can specify, e.g., -j4 to run up to 4 tests in parallel.

-vN: Verbosity level

This controls the amount of messages sent to the console. The default level is 21, meaning messages of level <=21 are printed. Message levels are hierarchical, as follows:

  • level 0: errors from the overall run. trut -v0 will be completely silent, unless something fails.
  • level 1: status of the overall run. An "OK" message will be printed at the end, but nothing else.
  • level 10: errors from individual TRUT files.
  • level 11: status of individual TRUT files. "OK" will be printed for each TRUT file.
  • level 20: errors from individual tests within TRUT files.
  • level 21: status of individual tests.
    Note that nested tests will be supported soon (e.g. TDL jobs nested within TDL scripts), with corresponding levels of 30, 31, etc.

-lN: Log verbosity level (that's "l" for "log")

This controls the amount of messages sent to the brief log, Trut.log (and trut.log). The default is 41. Note that the full log always contains ALL messages.

-pN: Persistence level

By default, testing is non-persistent --- trut stops as soon as it encounters an error. Sometimes you may want it to continue running through all possible tests, regardless of intermediate failures. This can be achieved by increasing the persistence level:

  • -p0: no persistence (default), stop on any error
  • -p1: abandon current TRUT file on any error, but go on with remaining TRUT files.
  • -p2: persist with top-level tests in each TRUT file regardless of error
  • -p3: persist with sub-tests
  • etc. Since test specifications are hierarchical (see .WritingTrutFiles), so are persistence levels.

-dContext=level: Debugging messages

You can use the standard -d option to get verbose messages from various debugging contexts (you do use this feature, right?)

Clone this wiki locally