summaryrefslogtreecommitdiff
path: root/docs/reference/glib/gtester.xml
blob: 5626d4df88f72760a4f877ad93c2bac28f90834f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<refentry id="gtester">

<refentryinfo>
<title>gtester</title>
<productname>GLib</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Tim</firstname>
<surname>Janik</surname>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Sven</firstname>
<surname>Herzberg</surname>
</author>
</authorgroup>
</refentryinfo>

<refmeta>
<refentrytitle>gtester</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gtester</refname>
<refpurpose>test running utility</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>gtester</command>
<arg choice="opt" rep="repeat">OPTION</arg>
<arg>testprogram</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>
<para><command>gtester</command> is a utility to run unit tests that have
been written using the GLib test framework.
</para>
<para>Since GLib 2.62, <command>gtester-report</command> is deprecated. Use
TAP for reporting test results instead, and feed it to the test harness provided
by your build system.</para>
<para>
When called with the <option>-o</option> option, <command>gtester</command>
writes an XML report of the test results, which can be converted
into HTML using the <command>gtester-report</command> utility.
</para>
</refsect1>

<refsect1><title>Options</title>
<variablelist>

<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem><para>
print help and exit
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-v</option>, <option>--version</option></term>
<listitem><para>
print version information and exit
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--g-fatal-warnings</option></term>
<listitem><para>
make warnings fatal
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-k</option>, <option>--keep-going</option></term>
<listitem><para>
continue running after tests failed
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-l</option></term>
<listitem><para>
list paths of available test cases
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-m=<replaceable>MODE</replaceable></option></term>
<listitem><para>
    run test cases in <replaceable>MODE</replaceable>, which can be one of:

    <variablelist>
      <varlistentry>
      <term><option>perf</option></term>
      <listitem><para>
          run performance tests
      </para></listitem>
      </varlistentry>

      <varlistentry>
      <term><option>slow</option>, <option>thorough</option></term>
      <listitem><para>
          run slow tests, or repeat non-deterministic tests more often
      </para></listitem>
      </varlistentry>

      <varlistentry>
      <term><option>quick</option></term>
      <listitem><para>
          do not run slow or performance tests, or do extra repeats
          of non-deterministic tests (default)
      </para></listitem>
      </varlistentry>

      <varlistentry>
      <term><option>undefined</option></term>
      <listitem><para>
          run test cases that deliberately provoke checks or assertion
          failures, if implemented (default)
      </para></listitem>
      </varlistentry>

      <varlistentry>
      <term><option>no-undefined</option></term>
      <listitem><para>
          do not run test cases that deliberately provoke checks or
          assertion failures
      </para></listitem>
      </varlistentry>
    </variablelist>

</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-p=<replaceable>TESTPATH</replaceable></option></term>
<listitem><para>
only run test cases matching <replaceable>TESTPATH</replaceable>
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-s=<replaceable>TESTPATH</replaceable></option></term>
<listitem><para>
skip test cases matching <replaceable>TESTPATH</replaceable>
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--seed=<replaceable>SEEDSTRING</replaceable></option></term>
<listitem><para>
run all test cases with random number seed <replaceable>SEEDSTRING</replaceable>
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-o=<replaceable>LOGFILE</replaceable></option></term>
<listitem><para>
write the test log to <replaceable>LOGFILE</replaceable>
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-q</option>, <option>--quiet</option></term>
<listitem><para>
suppress per test binary output
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>--verbose</option></term>
<listitem><para>
report success per testcase
</para></listitem>
</varlistentry>

</variablelist>
</refsect1>

<refsect1><title>See also</title>
<para>
<citerefentry>
<refentrytitle>gtester-report</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>