Skip to content

Run Options

Gavin Fielder edited this page Jul 23, 2019 · 14 revisions

These options are selected either in options-config.ini (to set the default run options) and/or as command line options.

In both cases, options are processed left to right, and can override previous selections.

Option On Off Default
Debugger compatibility Mode -d off*
Timeout -t -T on
Test history logging -l -L on
Include disabled tests -a -A off
Leaks test (BETA) -k -K off
Fork mode -x -X on
Handle Signals -s -S on **
Print run info before tests -i -I on
Refresh test results before each run -r -R on
Print responsive to window width -c -C on
Cleanup generated files after run -g -G off

* : default on for single tests
** : Only relevant to non-fork mode

Additional options when test history logging is enabled

Historical category
Select only the following = Recently failed tests f
Include the following + Recently passed tests p
Exclude the following - Outdated tests o
Tests with no history n
Option On Off Default
Update test history log when complete -w -W on

examples

  • ./test --p x runs tests that start with 'x', but excludes tests that recently passed.
  • ./test -d=po nocrash runs tests in debug mode that start with 'nocrash' that are either passing or outdated.
  • ./test -=f s runs only recently failed tests that start with 's'.

Timeout

On: -t ; Off: -T Default on.

Fails tests after a specified time interval. The timeout duration can be set in options-config.ini. Only available in fork mode.

Fork Mode

On: -x ; Off: -X Default on.

By default, PFT calls ft_printf only on forked child processes to improve stability. Turning this option off means that tests will run in a single process and a single thread. Timeout is not available when fork mode is off.

Handle Signals

On: -s ; Off: -S Default on.

(only applies to non-fork mode) When this option is off, signals will not be caught by PFT and PFT will stop immediately when a test aborts abnormally. When this option is on, abnormal terminations by certain signals will be caught by PFT and tests will continue running.

See Also