<refentry id="reference-gtpregress">
<refmeta>
<refentrytitle>gtpregress</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source-name">GoGui</refmiscinfo>
<refmiscinfo class="version">GoGui &version;</refmiscinfo>
<refmiscinfo class="manual">GoGui Reference</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gtpregress</refname>
<refpurpose>
Runs GTP regression tests.
</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>gtpregress</command>
<arg><option>-config</option> <replaceable>file</replaceable></arg>
<arg><option>-long</option></arg>
<arg><option>-output</option> <replaceable>directory</replaceable></arg>
<arg><option>-verbose</option></arg>
<arg choice="plain"><replaceable>program</replaceable></arg>
<arg choice="plain" rep="repeat">
<replaceable>test.tst</replaceable>
</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>gtpregress</command> <arg><option>-help</option></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>gtpregress</command> <arg><option>-version</option></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsection>
<title>Description</title>
<para>
Runs a regression test for a Go program supporting the Go Text Protocol,
and formats the output as HTML.
The regression tests are GTP files, using the special comment
<userinput>#?</userinput>, as used for the
<ulink url="http://www.gnu.org/software/gnugo/gnugo.html">GNU Go</ulink>
regression tests (see section 
<ulink url="http://www.uni-bonn.de/~uzsxtn/gnugo_22.html#SEC212">
Regression testing</ulink> of the GNU Go documentation).
The regular expression syntax for the expected responses is
mostly compatible to the one used by the GNU Go regression test suite,
see the documentation for
<ulink url="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern</ulink>
for a complete description.
</para>
<para>
The main output file is <filename>index.html</filename>.
For each test file
<filename><replaceable>test</replaceable>.tst</filename>,
additional files with name
<filename><replaceable>test</replaceable>.html</filename> and
<filename><replaceable>test</replaceable>.out.html</filename>
are generated.
Also creates a text file
<filename>summary.dat</filename>,
with a table row containing the most important summary statistics.
</para>
<para>
The return value of <command>gtpregress</command> is 0, if all tests
completed successfully with no unexpected fails, 1 if there was at
least one enexpected fail, and 2 if the Go program crashed.
</para>
</refsection>

<refsection>
<title>Options</title>
<variablelist>

<varlistentry>
<term>
<option>-config</option> <replaceable>file</replaceable>
</term>
<listitem>
<para>
Read command line options and arguments from file.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-help</option>
</term>
<listitem>
<para>
Display help and exit.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-long</option></term>
<listitem>
<para>
Print longer output to standard output, one line per test.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-output</option> <replaceable>directory</replaceable>
</term>
<listitem>
<para>
Write output files to
<filename><replaceable>directory</replaceable></filename>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-verbose</option></term>
<listitem>
<para>
Print the GTP stream to the Go program to standard error.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-version</option>
</term>
<listitem>
<para>
Print version and exit.
</para>
</listitem>
</varlistentry>

</variablelist>

<para>
<!-- Empty paragraph to enforce some space in JEditorPane (Java 1.5.0) -->
</para>

</refsection>

</refentry>
