From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Gevik Babakhani <pgdev(at)xs4all(dot)nl> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: question regarding regression tests |
Date: | 2006-09-15 21:41:41 |
Message-ID: | 20060915214141.GG17919@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Gevik Babakhani wrote:
> Folks,
>
> Could someone please provide information about how to create a correct
> regression test?
Some information you can find on the PGXS docs:
<para>
The scripts listed in the <varname>REGRESS</> variable are used for
regression testing of your module, just like <literal>make
installcheck</literal> is used for the main
<productname>PostgreSQL</productname> server. For this to work you need
to have a subdirectory named <literal>sql/</literal> in your extension's
directory, within which you put one file for each group of tests you want
to run. The files should have extension <literal>.sql</literal>, which
should not be included in the <varname>REGRESS</varname> list in the
makefile. For each test there should be a file containing the expected
result in a subdirectory named <literal>expected/</literal>, with extension
<literal>.out</literal>. The tests are run by executing <literal>make
installcheck</literal>, and the resulting output will be compared to the
expected files. The differences will be written to the file
<literal>regression.diffs</literal> in <command>diff -c</command> format.
Note that trying to run a test which is missing the expected file will be
reported as <quote>trouble</quote>, so make sure you have all expected
files.
</para>
Note that not all of this applies to the backend regression tests, but
it should help. For the backend, you list the tests in the
serial_schedule and parallel_schedule files.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-09-15 21:42:23 | Re: Update to msvc build sys |
Previous Message | Alvaro Herrera | 2006-09-15 21:38:19 | Re: Release notes |