Skip to content

Commit 1df3555

Browse files
committed
Get rid of the separate serial_schedule list of tests.
Having to maintain two lists of regression test scripts has proven annoyingly error-prone. We can achieve the effect of the serial_schedule by running the parallel_schedule with "--max_connections=1"; so do that and remove serial_schedule. This causes cosmetic differences in the progress output, but it doesn't seem worth restructuring pg_regress to avoid that. Discussion: https://postgr.es/m/899209.1620759506@sss.pgh.pa.us
1 parent 5b2d09b commit 1df3555

File tree

3 files changed

+15
-215
lines changed

3 files changed

+15
-215
lines changed

src/test/regress/GNUmakefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ regress_data_files = \
8383
$(wildcard $(srcdir)/output/*.source) \
8484
$(filter-out $(addprefix $(srcdir)/,$(input_files)),$(wildcard $(srcdir)/sql/*.sql)) \
8585
$(wildcard $(srcdir)/data/*.data) \
86-
$(srcdir)/parallel_schedule $(srcdir)/serial_schedule $(srcdir)/resultmap
86+
$(srcdir)/parallel_schedule $(srcdir)/resultmap
8787

8888
install-tests: all install install-lib installdirs-tests
8989
$(MAKE) -C $(top_builddir)/contrib/spi install
@@ -128,7 +128,7 @@ check-tests: all | temp-install
128128
$(pg_regress_check) $(REGRESS_OPTS) $(MAXCONNOPT) $(TESTS) $(EXTRA_TESTS)
129129

130130
installcheck: all
131-
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS)
131+
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule --max-connections=1 $(EXTRA_TESTS)
132132

133133
installcheck-parallel: all
134134
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
@@ -146,7 +146,7 @@ runtest: installcheck
146146
runtest-parallel: installcheck-parallel
147147

148148
bigtest: all
149-
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule numeric_big
149+
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule --max-connections=1 numeric_big
150150

151151
bigcheck: all | temp-install
152152
$(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big

src/test/regress/serial_schedule

-212
This file was deleted.

src/tools/msvc/vcregress.pl

+12
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
sub installcheck_internal
107107
{
108108
my ($schedule, @EXTRA_REGRESS_OPTS) = @_;
109+
# for backwards compatibility, "serial" runs the tests in
110+
# parallel_schedule one by one.
111+
my $maxconn = $maxconn;
112+
$maxconn = "--max_connections=1" if $schedule eq 'serial';
113+
$schedule = 'parallel' if $schedule eq 'serial';
114+
109115
my @args = (
110116
"../../../$Config/pg_regress/pg_regress",
111117
"--dlpath=.",
@@ -132,6 +138,12 @@ sub installcheck
132138
sub check
133139
{
134140
my $schedule = shift || 'parallel';
141+
# for backwards compatibility, "serial" runs the tests in
142+
# parallel_schedule one by one.
143+
my $maxconn = $maxconn;
144+
$maxconn = "--max_connections=1" if $schedule eq 'serial';
145+
$schedule = 'parallel' if $schedule eq 'serial';
146+
135147
InstallTemp();
136148
chdir "${topdir}/src/test/regress";
137149
my @args = (

0 commit comments

Comments
 (0)