postgresql/src/test
Tom Lane 4b538727e2 Fix make rules that generate multiple output files.
For years, our makefiles have correctly observed that "there is no correct
way to write a rule that generates two files".  However, what we did is to
provide empty rules that "generate" the secondary output files from the
primary one, and that's not right either.  Depending on the details of
the creating process, the primary file might end up timestamped later than
one or more secondary files, causing subsequent make runs to consider the
secondary file(s) out of date.  That's harmless in a plain build, since
make will just re-execute the empty rule and nothing happens.  But it's
fatal in a VPATH build, since make will expect the secondary file to be
rebuilt in the build directory.  This would manifest as "file not found"
failures during VPATH builds from tarballs, if we were ever unlucky enough
to ship a tarball with apparently out-of-date secondary files.  (It's not
clear whether that has ever actually happened, but it definitely could.)

To ensure that secondary output files have timestamps >= their primary's,
change our makefile convention to be that we provide a "touch $@" action
not an empty rule.  Also, make sure that this rule actually gets invoked
during a distprep run, else the hazard remains.

It's been like this a long time, so back-patch to all supported branches.

In HEAD, I skipped the changes in src/backend/catalog/Makefile, because
those rules are due to get replaced soon in the bootstrap data format
patch, and there seems no need to create a merge issue for that patch.
If for some reason we fail to land that patch in v11, we'll need to
back-fill the changes in that one makefile from v10.

Discussion: https://postgr.es/m/18556.1521668179@sss.pgh.pa.us
2018-03-23 13:46:00 -04:00
..
authentication Add installcheck support to more test suites 2018-01-23 07:11:38 -05:00
examples Document security implications of search_path and the public schema. 2018-02-26 07:39:44 -08:00
isolation Fix make rules that generate multiple output files. 2018-03-23 13:46:00 -04:00
kerberos Tests for Kerberos/GSSAPI authentication 2018-03-06 10:57:36 -05:00
ldap Prevent LDAP and SSL tests from running without support in build 2018-03-03 08:52:21 -05:00
locale Add a temp-install prerequisite to "check"-like targets not having one. 2017-11-05 18:51:08 -08:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Improve predtest.c's handling of cases with NULL-constant inputs. 2018-03-21 18:30:46 -04:00
perl Don't use an Msys virtual path to create a tablespace 2018-03-20 08:25:36 +10:30
recovery Don't use an Msys virtual path to create a tablespace 2018-03-20 08:25:36 +10:30
regress Allow FOR EACH ROW triggers on partitioned tables 2018-03-23 10:48:22 -03:00
ssl Add ssl_passphrase_command setting 2018-03-17 08:28:51 -04:00
subscription Fix filtering of unsupported relations in logical replication 2018-02-23 22:13:21 -05:00
thread Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Tests for Kerberos/GSSAPI authentication 2018-03-06 10:57:36 -05:00
README Add TAP tests for password-based authentication methods. 2017-03-17 11:34:16 +02:00

README

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication

thread/
  A thread-safety-testing utility used by configure