nihtest.conf
—
-C
flag. This man page describes the format of this
configuration file.
settings
, environment
, 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.
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
.default-working-directory
=
directoryworking-directory
directive is found in the
test.environment-clear
= true
environment-clear
is set to
true
, only variables explicitly set or passed
through are included in the environment passed to the tested program.environment-passthrough
=
variable ...environment-unset
=
variable ...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 ...environment
section contains variable and values
that will be added as environment variables when the test program is run.
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
comparator-preprocessors
section specifies programs
to use to preprocess certain file types for comparison. The variable names
have the format got-extension.
expected-extension, the value specifies the command line
to use to preprocess the file in the sandbox. The command will be run with the
file in the sandbox first as argument. The command's output will be compared
to the expected file.
If the command doesn't exit with code 0, the test will fail.
copiers
section specifies programs to use to copy
certain file types into the sandbox. The variable names have the format
sandbox-extension.
source-extension, the value specifies the command line
to use to copy the file into the sandbox. The command will be run with the two
files as arguments, the source file first and the file in the sandbox last.
If the command doesn't exit with code 0, the test will fail.
[settings] default-program = program_to_test program-directories = bin tests [environment] LC_ALL=en_US.UTF-8 [comparators] zip.zip = zipcmp -v