aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2022-03-21 09:31:22 +1300
committerThomas Munro <tmunro@postgresql.org>2022-03-21 09:31:51 +1300
commita096813b6f583621db4119b6ab1be4ffc26f859d (patch)
tree356887389a40a9bb031508435c1d1bcbcdc96d53
parent7fa3db367986160dee2b2b0bbfb61e1a51d486fd (diff)
downloadpostgresql-a096813b6f583621db4119b6ab1be4ffc26f859d.tar.gz
postgresql-a096813b6f583621db4119b6ab1be4ffc26f859d.zip
Log regression.diffs in 027_stream_regress.pl.
To help diagnose the reasons for a regression test failure inside this TAP test, dump the contents of regression.diffs to the log. While the CI scripts show it automatically, the build farm client does not. Reviewed-by: Andrew Dunstan <andrew@dunslane.net> Discussion: https://postgr.es/m/CA%2BhUKGLsrWbiCcMxBLRBAP6Z%3DykFRHWzdmP9YKujSKoSnEJECQ%40mail.gmail.com
-rw-r--r--src/test/recovery/t/027_stream_regress.pl30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl
index c40951b7baf..aa972f89584 100644
--- a/src/test/recovery/t/027_stream_regress.pl
+++ b/src/test/recovery/t/027_stream_regress.pl
@@ -53,15 +53,27 @@ my $outputdir = $PostgreSQL::Test::Utils::tmp_check;
# Run the regression tests against the primary.
my $extra_opts = $ENV{EXTRA_REGRESS_OPTS} || "";
-system_or_bail($ENV{PG_REGRESS} . " $extra_opts " .
- "--dlpath=\"$dlpath\" " .
- "--bindir= " .
- "--host=" . $node_primary->host . " " .
- "--port=" . $node_primary->port . " " .
- "--schedule=../regress/parallel_schedule " .
- "--max-concurrent-tests=20 " .
- "--inputdir=../regress " .
- "--outputdir=\"$outputdir\"");
+my $rc = system($ENV{PG_REGRESS} . " $extra_opts " .
+ "--dlpath=\"$dlpath\" " .
+ "--bindir= " .
+ "--host=" . $node_primary->host . " " .
+ "--port=" . $node_primary->port . " " .
+ "--schedule=../regress/parallel_schedule " .
+ "--max-concurrent-tests=20 " .
+ "--inputdir=../regress " .
+ "--outputdir=\"$outputdir\"");
+if ($rc != 0)
+{
+ # Dump out the regression diffs file, if there is one
+ my $diffs = "$outputdir/regression.diffs";
+ if (-e $diffs)
+ {
+ print "=== dumping $diffs ===\n";
+ print slurp_file($diffs);
+ print "=== EOF ===\n";
+ }
+}
+is($rc, 0, 'regression tests pass');
# Clobber all sequences with their next value, so that we don't have
# differences between nodes due to caching.