From: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Rewriting the test of pg_upgrade as a TAP test - take two |
Date: | 2018-03-04 04:04:41 |
Message-ID: | CAA8=A79KwJ4Yt3C9LAMt9-i+N=jDP2Z+NoE0qh069BetX0kmCw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 4, 2018 at 12:42 AM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 1/26/18 03:00, Michael Paquier wrote:
>> As promised on a recent thread, here is a second tentative to switch
>> pg_upgrade's test.sh into a TAP infrastructure.
>
> AFAICT, this still has the same problem as the previous take, namely
> that adding a TAP test suite to the pg_upgrade subdirectory will end up
> with the build farm client running the pg_upgrade tests twice. What we
> likely need here is an update to the build farm client in conjunction
> with this.
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
Something like this should do the trick.
diff --git a/PGBuild/Modules/TestUpgrade.pm b/PGBuild/Modules/TestUpgrade.pm
index 8406d27..05859f9 100644
--- a/PGBuild/Modules/TestUpgrade.pm
+++ b/PGBuild/Modules/TestUpgrade.pm
@@ -50,6 +50,11 @@ sub setup
"overly long build root $buildroot will cause upgrade problems - try
something shorter than 46 chars"
if (length($buildroot) > 46);
+ # don't run module if builtin test is enabled.
+ my $using_tap_tests = $conf->using_msvc ? $conf->{config}->{tap_tests} :
+ grep {$_ eq '--enable-tap-tests'} @{$conf->{config}} ;
+ return if $using_tap_tests && -d
"$buildroot/$branch/pgsql/src/bin/pg_upgrade/t";
+
# could even set up several of these (e.g. for different branches)
my $self = {
buildroot => $buildroot,
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2018-03-04 04:40:38 | Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)? |
Previous Message | Thomas Munro | 2018-03-04 03:37:01 | Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)? |