@@ -47,7 +47,7 @@ make check
47
47
<screen>
48
48
<computeroutput>
49
49
=======================
50
- All 115 tests passed.
50
+ All 193 tests passed.
51
51
=======================
52
52
</computeroutput>
53
53
</screen>
@@ -98,7 +98,7 @@ make MAX_CONNECTIONS=10 check
98
98
99
99
<para>
100
100
To run the tests after installation (see <xref linkend="installation"/>),
101
- initialize a data area and start the
101
+ initialize a data directory and start the
102
102
server as explained in <xref linkend="runtime"/>, then type:
103
103
<screen>
104
104
make installcheck
@@ -116,10 +116,10 @@ make installcheck-parallel
116
116
117
117
<para>
118
118
The tests will also transiently create some cluster-wide objects, such as
119
- roles and tablespaces . These objects will have names beginning with
120
- <literal>regress_</literal>. Beware of using <literal>installcheck</literal>
121
- mode in installations that have any actual users or tablespaces named
122
- that way.
119
+ roles, tablespaces, and subscriptions . These objects will have names
120
+ beginning with <literal>regress_</literal>. Beware of
121
+ using <literal>installcheck</literal> mode with an installation that has
122
+ any actual global objects named that way.
123
123
</para>
124
124
</sect2>
125
125
@@ -130,7 +130,7 @@ make installcheck-parallel
130
130
The <literal>make check</literal> and <literal>make installcheck</literal> commands
131
131
run only the <quote>core</quote> regression tests, which test built-in
132
132
functionality of the <productname>PostgreSQL</productname> server. The source
133
- distribution also contains additional test suites, most of them having
133
+ distribution contains many additional test suites, most of them having
134
134
to do with add-on functionality such as optional procedural languages.
135
135
</para>
136
136
@@ -146,9 +146,24 @@ make installcheck-world
146
146
already-installed server, respectively, just as previously explained
147
147
for <literal>make check</literal> and <literal>make installcheck</literal>. Other
148
148
considerations are the same as previously explained for each method.
149
- Note that <literal>make check-world</literal> builds a separate temporary
150
- installation tree for each tested module, so it requires a great deal
151
- more time and disk space than <literal>make installcheck-world</literal>.
149
+ Note that <literal>make check-world</literal> builds a separate instance
150
+ (temporary data directory) for each tested module, so it requires more
151
+ time and disk space than <literal>make installcheck-world</literal>.
152
+ </para>
153
+
154
+ <para>
155
+ On a modern machine with multiple CPU cores and no tight operating-system
156
+ limits, you can make things go substantially faster with parallelism.
157
+ The recipe that most PostgreSQL developers actually use for running all
158
+ tests is something like
159
+ <screen>
160
+ make check-world -j8 >/dev/null
161
+ </screen>
162
+ with a <option>-j</option> limit near to or a bit more than the number
163
+ of available cores. Discarding <systemitem>stdout</systemitem>
164
+ eliminates chatter that's not interesting when you just want to verify
165
+ success. (In case of failure, the <systemitem>stderr</systemitem>
166
+ messages are usually enough to determine where to look closer.)
152
167
</para>
153
168
154
169
<para>
@@ -166,8 +181,7 @@ make installcheck-world
166
181
<itemizedlist>
167
182
<listitem>
168
183
<para>
169
- Regression tests for optional procedural languages (other than
170
- <application>PL/pgSQL</application>, which is tested by the core tests).
184
+ Regression tests for optional procedural languages.
171
185
These are located under <filename>src/pl</filename>.
172
186
</para>
173
187
</listitem>
@@ -184,6 +198,13 @@ make installcheck-world
184
198
located in <filename>src/interfaces/ecpg/test</filename>.
185
199
</para>
186
200
</listitem>
201
+ <listitem>
202
+ <para>
203
+ Tests for core-supported authentication methods,
204
+ located in <filename>src/test/authentication</filename>.
205
+ (See below for additional authentication-related tests.)
206
+ </para>
207
+ </listitem>
187
208
<listitem>
188
209
<para>
189
210
Tests stressing behavior of concurrent sessions,
@@ -192,21 +213,36 @@ make installcheck-world
192
213
</listitem>
193
214
<listitem>
194
215
<para>
195
- Tests of client programs under <filename>src/bin</filename>. See
196
- also <xref linkend="regress-tap"/>.
216
+ Tests for crash recovery and physical replication,
217
+ located in <filename>src/test/recovery</filename>.
218
+ </para>
219
+ </listitem>
220
+ <listitem>
221
+ <para>
222
+ Tests for logical replication,
223
+ located in <filename>src/test/subscription</filename>.
224
+ </para>
225
+ </listitem>
226
+ <listitem>
227
+ <para>
228
+ Tests of client programs, located under <filename>src/bin</filename>.
197
229
</para>
198
230
</listitem>
199
231
</itemizedlist>
200
232
201
233
<para>
202
- When using <literal>installcheck</literal> mode, these tests will destroy any
203
- existing databases named <literal>pl_regression</literal>,
204
- <literal>contrib_regression</literal>, <literal>isolation_regression</literal>,
205
- <literal>ecpg1_regression</literal>, or <literal>ecpg2_regression</literal>, as well as
206
- <literal>regression</literal>.
234
+ When using <literal>installcheck</literal> mode, these tests will create
235
+ and destroy test databases whose names
236
+ include <literal>regression</literal>, for
237
+ example <literal>pl_regression</literal>
238
+ or <literal>contrib_regression</literal>. Beware of
239
+ using <literal>installcheck</literal> mode with an installation that has
240
+ any non-test databases named that way.
207
241
</para>
208
242
209
243
<para>
244
+ Some of these auxiliary test suites use the TAP infrastructure explained
245
+ in <xref linkend="regress-tap"/>.
210
246
The TAP-based tests are run only when PostgreSQL was configured with the
211
247
option <option>--enable-tap-tests</option>. This is recommended for
212
248
development, but can be omitted if there is no suitable Perl installation.
@@ -259,6 +295,17 @@ make check-world PG_TEST_EXTRA='kerberos ldap ssl'
259
295
configuration are not run even if they are mentioned in
260
296
<varname>PG_TEST_EXTRA</varname>.
261
297
</para>
298
+
299
+ <para>
300
+ In addition, there are tests in <filename>src/test/modules</filename>
301
+ which will be run by <literal>make check-world</literal> but not
302
+ by <literal>make installcheck-world</literal>. This is because they
303
+ install non-production extensions or have other side-effects that are
304
+ considered undesirable for a production installation. You can
305
+ use <literal>make install</literal> and <literal>make
306
+ installcheck</literal> in one of those subdirectories if you wish,
307
+ but it's not recommended to do so with a non-test server.
308
+ </para>
262
309
</sect2>
263
310
264
311
<sect2>
@@ -737,6 +784,26 @@ make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
737
784
The TAP tests require the Perl module <literal>IPC::Run</literal>.
738
785
This module is available from CPAN or an operating system package.
739
786
</para>
787
+
788
+ <para>
789
+ Generically speaking, the TAP tests will test the executables in a
790
+ previously-installed installation tree if you say <literal>make
791
+ installcheck</literal>, or will build a new local installation tree from
792
+ current sources if you say <literal>make check</literal>. In either
793
+ case they will initialize a local instance (data directory) and
794
+ transiently run a server in it. Some of these tests run more than one
795
+ server. Thus, these tests can be fairly resource-intensive.
796
+ </para>
797
+
798
+ <para>
799
+ It's important to realize that the TAP tests will start test server(s)
800
+ even when you say <literal>make installcheck</literal>; this is unlike
801
+ the traditional non-TAP testing infrastructure, which expects to use an
802
+ already-running test server in that case. Some PostgreSQL
803
+ subdirectories contain both traditional-style and TAP-style tests,
804
+ meaning that <literal>make installcheck</literal> will produce a mix of
805
+ results from temporary servers and the already-running test server.
806
+ </para>
740
807
</sect1>
741
808
742
809
<sect1 id="regress-coverage">
0 commit comments