NIHTEST.CONF(5) | File Formats Manual | NIHTEST.CONF(5) |
nihtest.conf
—
testing tool configuration file format
nihtest(1) is a testing
tool. It reads a configuration file to get its default settings. The default
path for the file is nihtest.conf in the current
directory; this can be overridden with
nihtest(1)'s
-C
flag. This man page describes the format of this
configuration file.
The configuration file consists of multiple sections, which are
started with [section-name]. The supported sections
are settings
, setenv
, and
comparators
.
Each section consists of variable assignments in the format name = value, one per line.
Multiple values for the same variable can be specified, one per line, where subsequent lines must be indented with spaces.
In the settings
section, the following
variables are recognized:
default-program
=
programprogram
directive is found in the test.default-stderr-replace
=
pattern replacement ...stderr-replace
directives. See
nihtest-case(5) for details on
stderr-replace
.features-files
=
file ...features
directive in test cases.keep-sandbox
=
when--keep-broken
-=
when or --no-cleanup
. The
default is never
.print-results
=
when--quiet
or --verbose
. The
default is failed
.program-directories
=
directory ...PATH
.sandbox-directories
=
directory ...test-input-directories
=
directory ...The setenv
section contains variable and
values that will be added as environment variables when the test program is
run. If the test case contains a setenv
directive,
this section will be ignored.
The comparators
section specifies programs
to use to compare files of certain types. The variable names have the format
got-extension.
expected-extension, the value specifies the command
line to use to compare these files. The command will be run with the two
files as arguments, the file in the sandbox first and the expected last.
The command is expected to exit with code 0 if the two files are
considered equal, any other exit code if not. The command output will be
displayed if verbose test results are enabled (see
print-results
above).
For example, with comparators containing
zip.zip = zipcmp -v
file got.zip
expected.zip
zipcmp -v got.zip
expected.zip
[settings] default-program = program_to_test program-directories = bin tests [environment] LC_ALL=en_US.UTF-8 [comparators] zip.zip = zipcmp -v
June 9, 2023 | NiH |