Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit19fecee

Browse files
committed
Document PGXS' REGRESS feature.
1 parent9a39423 commit19fecee

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

‎doc/src/sgml/xfunc.sgml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.108 2005/11/17 22:14:50 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.109 2005/11/29 01:46:54 alvherre Exp $
33
-->
44

55
<sect1 id="xfunc">
@@ -2106,7 +2106,7 @@ include $(PGXS)
21062106
<term><varname>REGRESS</varname></term>
21072107
<listitem>
21082108
<para>
2109-
list of regression test cases (without suffix)
2109+
list of regression test cases (without suffix), see below
21102110
</para>
21112111
</listitem>
21122112
</varlistentry>
@@ -2186,6 +2186,36 @@ include $(PGXS)
21862186
corresponds to the first <command>pg_config</command> command
21872187
found in your path.
21882188
</para>
2189+
2190+
<para>
2191+
The scripts listed in the <varname>REGRESS</> variable are used for
2192+
regression testing of your module, just like <literal>make
2193+
installcheck</literal> is used for the main
2194+
<productname>PostgreSQL</productname> server. For this to work you need
2195+
to have a subdirectory named <literal>sql/</literal> in your extension's
2196+
directory, within which you put one file for each group of tests you want
2197+
to run. The files should have extension <literal>.sql</literal>, which
2198+
should not be included in the <varname>REGRESS</varname> list in the
2199+
makefile. For each test there should be a file containing the expected
2200+
result in a subdirectory named <literal>expected/</literal>, with extension
2201+
<literal>.out</literal>. The tests are run by executing <literal>make
2202+
installcheck</literal>, and the resulting output will be compared to the
2203+
expected files. The differences will be written to the file
2204+
<literal>regression.diffs</literal> in <command>diff -c</command> format.
2205+
Note that trying to run a test which is missing the expected file will be
2206+
reported as <quote>trouble</quote>, so make sure you have all expected
2207+
files.
2208+
</para>
2209+
2210+
<tip>
2211+
<para>
2212+
The easiest way of creating the expected files is creating empty files,
2213+
then carefully inspecting the result files after a test run (to be found
2214+
in the <literal>results/</literal> directory), and copying them to
2215+
<literal>expected/</literal> if they match what you want from the test.
2216+
</para>
2217+
2218+
</tip>
21892219
</sect2>
21902220

21912221

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp