1NIHTEST.CONF(5) File Formats Manual NIHTEST.CONF(5)
2
3
4
6 nihtest.conf - testing tool configuration file format
7
9 nihtest(1) is a testing tool. It reads a configuration file to get its
10 default settings. The default path for the file is nihtest.conf in the
11 current directory; this can be overridden with nihtest(1)'s -C flag.
12 This man page describes the format of this configuration file.
13
15 The configuration file consists of multiple sections, which are started
16 with [section-name]. The supported sections are settings, environment,
17 and comparators.
18
19 Each section consists of variable assignments in the format name =
20 value, one per line.
21
22 Multiple values for the same variable can be specified, one per line,
23 where subsequent lines must be indented with spaces.
24
26 In the settings section, the following variables are recognized:
27
28 default-program = program
29 Test program if no program directive is found in
30 the test.
31
32 default-stderr-replace = pattern replacement ...
33 Each line consists of two values, pattern is a
34 regular expression and replacement the
35 corresponding replacement string. These are used
36 for test cases without stderr-replace directives.
37 See nihtest-case(5) for details on stderr-
38 replace.
39
40 environment-clear = true
41 If environment-clear is set to true, only
42 variables explicitly set or passed through are
43 included in the environment passed to the tested
44 program.
45
46 environment-passthrough = variable ...
47 The named environment variables are passed
48 through from the environment nihtest(1) is run in
49 to the environment passed to the tested program.
50
51 environment-unset = variable ...
52 The named environment variables are removed from
53 the environment passed to the tested program.
54
55 features-files = file ...
56 Specifies the files to search for feature
57 defines. This is used in the features directive
58 in test cases.
59
60 keep-sandbox = when Describe when to keep the sandbox (i.e., not
61 delete it) after running the test. The following
62 values are supported:
63 never Never keep the sandbox.
64 failed Keep the sandbox when the test
65 failed.
66 always Always keep the sandbox.
67 This can be overridden with the nihtest(1) flags
68 --keep-broken -= when or --no-cleanup. The
69 default is never.
70
71 print-results = when Describe when to print the test results
72 verbosely. The following values are supported:
73 never Quiet mode.
74 failed Print details when the test
75 failed.
76 always Verbose mode.
77 This can be overridden with the nihtest(1) flags
78 --quiet or --verbose. The default is failed.
79
80 program-directories = directory ...
81 Specifies the directories programs are searched
82 for. They are prepended to PATH.
83
84 sandbox-directories = directory ...
85 Create sandboxes in directory. By default, the
86 sandboxes will be created in the current
87 directory. A random directory of the pattern
88 sandbox_* will be used.
89
90 test-input-directories = directory ...
91 nihtest(1) searches the current directory and
92 directory for test cases, input and output files.
93
95 The environment section contains variable and values that will be added
96 as environment variables when the test program is run.
97
99 The comparators section specifies programs to use to compare files of
100 certain types. The variable names have the format got-extension.
101 expected-extension, the value specifies the command line to use to
102 compare these files. The command will be run with the two files as
103 arguments, the file in the sandbox first and the expected last.
104
105 The command is expected to exit with code 0 if the two files are
106 considered equal, any other exit code if not. The command output will
107 be displayed if verbose test results are enabled (see print-results
108 above).
109
110 For example, with comparators containing
111 zip.zip = zipcmp -v
112 and the test case containing
113 file got.zip expected.zip
114 the command
115 zipcmp -v got.zip expected.zip
116 will be run to compare the files.
117
119 [settings]
120 default-program = program_to_test
121 program-directories = bin
122 tests
123 [environment]
124 LC_ALL=en_US.UTF-8
125 [comparators]
126 zip.zip = zipcmp -v
127
129 nihtest(1)
130
131
132
133Linux 6.3.8-200.fc38.s390x June 15, 2023 NIHTEST.CONF(5)