Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]

Lists: pgsql-hackers
From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 14:31:30
Message-ID: 20141216143130.GC20615@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Andrew,

Did you have a chance to review this?

Alvaro Herrera wrote:
> Andrew Dunstan wrote:
> >
> > On 11/29/2014 10:09 PM, Alvaro Herrera wrote:

> > >Anyway I just pushed this src/test/modules/ patch, which has
> > >implications for buildfarm: these new test modules are not invoked
> > >except explicitely. How would go about getting members to run "cd
> > >src/test/modules ; make check ; make installcheck"? I imagine it's
> > >impossible to do it unless each member maintainer update the buildfarm
> > >client script, right?
> >
> > Yes.
> >
> > Why are we going to run both check and installcheck? And what output files
> > are created? The buildfarm will need to know.
>
> Well, initially the patch moved test_decoding to src/test/modules, which
> requires make check, but I left that in contrib due to complaints, and
> all remaining modules are happy to use make installcheck. Attached is a
> patch to run_build.pl that adds src/test/modules build, install and
> check. I also added the vcregress call (just copied it from the contrib
> one, really), but of course that doesn't work at all yet since MSVC
> doesn't build it. Would you give it a look? I would like to have
> buildfarm doing this before moving on with more stuff.

> diff --git a/run_build.pl b/run_build.pl
> index a358d9c..77fcf62 100755
> --- a/run_build.pl
> +++ b/run_build.pl
> @@ -665,6 +665,8 @@ make_bin_check();
> # contrib is builtunder standard build step for msvc
> make_contrib() unless ($using_msvc);
>
> +make_testmodules();
> +
> make_doc() if (check_optional_step('build_docs'));
>
> make_install();
> @@ -672,6 +674,8 @@ make_install();
> # contrib is installed under standard install for msvc
> make_contrib_install() unless ($using_msvc);
>
> +make_testmodules_install();
> +
> process_module_hooks('configure');
>
> process_module_hooks('build');
> @@ -753,6 +757,19 @@ foreach my $locale (@locales)
> make_contrib_install_check($locale);
> }
>
> + if (step_wanted('testmodules-install-check'))
> + {
> + print time_str(),"restarting db ($locale)...\n" if $verbose;
> +
> + stop_db($locale);
> + start_db($locale);
> +
> + print time_str(),"running make test-modules installcheck ($locale)...\n"
> + if $verbose;
> +
> + make_testmodules_install_check($locale);
> + }
> +
> print time_str(),"stopping db ($locale)...\n" if $verbose;
>
> stop_db($locale);
> @@ -1062,6 +1079,22 @@ sub make_contrib
> $steps_completed .= " Contrib";
> }
>
> +sub make_testmodules
> +{
> + return unless step_wanted('testmodules');
> + print time_str(),"running make src/test/modules ...\n" if $verbose;
> +
> + my $make_cmd = $make;
> + $make_cmd = "$make -j $make_jobs"
> + if ($make_jobs > 1 && ($branch eq 'HEAD' || $branch ge 'REL9_1'));
> + my @makeout = `cd $pgsql/src/test/modules && $make_cmd 2>&1`;
> + my $status = $? >> 8;
> + writelog('make-testmodules',\(at)makeout);
> + print "======== make testmodules log ===========\n",@makeout if ($verbose > 1);
> + send_result('TestModules',$status,\(at)makeout) if $status;
> + $steps_completed .= " TestModules";
> +}
> +
> sub make_contrib_install
> {
> return
> @@ -1081,6 +1114,23 @@ sub make_contrib_install
> $steps_completed .= " ContribInstall";
> }
>
> +sub make_testmodules_install
> +{
> + return
> + unless (step_wanted('testmodules')
> + and step_wanted('install'));
> + print time_str(),"running make testmodules install ...\n"
> + if $verbose;
> +
> + my @makeout = `cd $pgsql/src/test/modules && $make install 2>&1`;
> + my $status = $? >>8;
> + writelog('install-testmodules',\(at)makeout);
> + print "======== make testmodules install log ===========\n",@makeout
> + if ($verbose > 1);
> + send_result('TestModulesInstall',$status,\(at)makeout) if $status;
> + $steps_completed .= " TestModulesInstall";
> +}
> +
> sub initdb
> {
> my $locale = shift;
> @@ -1317,6 +1367,50 @@ sub make_contrib_install_check
> $steps_completed .= " ContribCheck-$locale";
> }
>
> +sub make_testmodules_install_check
> +{
> + my $locale = shift;
> + return unless step_wanted('testmodules-install-check');
> + my @checklog;
> + unless ($using_msvc)
> + {
> + @checklog =
> + `cd $pgsql/src/test/modules && $make USE_MODULE_DB=1 installcheck 2>&1`;
> + }
> + else
> + {
> + chdir "$pgsql/src/tools/msvc";
> + @checklog = `perl vcregress.pl modulescheck 2>&1`;
> + chdir $branch_root;
> + }
> + my $status = $? >>8;
> + my @logs = glob("$pgsql/src/test/modules/*/regression.diffs");
> + push(@logs,"$installdir/logfile");
> + foreach my $logfile (@logs)
> + {
> + next unless (-e $logfile);
> + push(@checklog,"\n\n================= $logfile ===================\n");
> + my $handle;
> + open($handle,$logfile);
> + while(<$handle>)
> + {
> + push(@checklog,$_);
> + }
> + close($handle);
> + }
> + if ($status)
> + {
> + my @trace =
> + get_stack_trace("$installdir/bin","$installdir/data");
> + push(@checklog,@trace);
> + }
> + writelog("testmodules-install-check-$locale",\(at)checklog);
> + print "======== make testmodules installcheck log ===========\n",@checklog
> + if ($verbose > 1);
> + send_result("TestModulesCheck-$locale",$status,\(at)checklog) if $status;
> + $steps_completed .= " TestModulesCheck-$locale";
> +}
> +
> sub make_pl_install_check
> {
> my $locale = shift;

--
Álvaro Herrera http://www.flickr.com/photos/alvherre/
"Ah, spring... when a young penguin's fancy lightly turns to thoughts of ...
Beta testing!" (Fedora 9 beta announcement)


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 16:22:55
Message-ID: 54905C5F.60803@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 12/16/2014 09:31 AM, Alvaro Herrera wrote:
> Hi Andrew,
>
> Did you have a chance to review this?
>
>

Oh, darn, not yet. I will try to take a look today.

cheers

andrew


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 20:44:47
Message-ID: 549099BF.5070707@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 12/16/2014 11:22 AM, Andrew Dunstan wrote:
>
>
>
> On 12/16/2014 09:31 AM, Alvaro Herrera wrote:
>> Hi Andrew,
>>
>> Did you have a chance to review this?
>>
>>
>
> Oh, darn, not yet. I will try to take a look today.

I have pushed this change, and crake will be running the code. See
<https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e>
Any brave buildfarm owners on *nix can try it by replacing their copy of
run_build.pl with the bleeding edge version. We can't put it in a client
release until we fix up the MSVC side of things.

cheers

andrew


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 21:02:27
Message-ID: 20141216210227.GZ1768@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:

> I have pushed this change, and crake will be running the code. See <https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e>

Crake just uploaded its first test results with the testmodules stuff
working:
http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2014-12-16%2020%3A46%3A04

Thanks for setting it up.

> Any brave buildfarm owners on *nix can try it by replacing their copy of
> run_build.pl with the bleeding edge version. We can't put it in a client
> release until we fix up the MSVC side of things.

I guess I will have to find someone to assist me in architecting a
solution for the MSVC stuff.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 21:04:02
Message-ID: 54909E42.8090901@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 12/16/2014 04:02 PM, Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
>> I have pushed this change, and crake will be running the code. See <https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e>
> Crake just uploaded its first test results with the testmodules stuff
> working:
> http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2014-12-16%2020%3A46%3A04
>
> Thanks for setting it up.
>
>> Any brave buildfarm owners on *nix can try it by replacing their copy of
>> run_build.pl with the bleeding edge version. We can't put it in a client
>> release until we fix up the MSVC side of things.
> I guess I will have to find someone to assist me in architecting a
> solution for the MSVC stuff.
>

I might be able to help in a couple of days.

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 21:44:20
Message-ID: 12988.1418766260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I have pushed this change, and crake will be running the code. See
> <https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e>
> Any brave buildfarm owners on *nix can try it by replacing their copy of
> run_build.pl with the bleeding edge version. We can't put it in a client
> release until we fix up the MSVC side of things.

I've put this in dromedary as well (though the HEAD build that's running
right this moment is still using the 4.13 script). I take it I don't need
to adjust the configuration file?

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-16 22:13:40
Message-ID: 5490AE94.2080301@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 12/16/2014 04:44 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> I have pushed this change, and crake will be running the code. See
>> <https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e>
>> Any brave buildfarm owners on *nix can try it by replacing their copy of
>> run_build.pl with the bleeding edge version. We can't put it in a client
>> release until we fix up the MSVC side of things.
> I've put this in dromedary as well (though the HEAD build that's running
> right this moment is still using the 4.13 script). I take it I don't need
> to adjust the configuration file?

Nope, no config changes required.

cheers

andrew


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 06:37:40
Message-ID: CAB7nPqTXLNnKUGkOoFk=1p5V7MWQPwD4YfTzq8D+xNYxQHhOvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Dec 17, 2014 at 6:02 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
>
> Andrew Dunstan wrote:
>
> > I have pushed this change, and crake will be running the code. See <
> https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e
> >
>
> Crake just uploaded its first test results with the testmodules stuff
> working:
>
> http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2014-12-16%2020%3A46%3A04
>
> Thanks for setting it up.
>
> > Any brave buildfarm owners on *nix can try it by replacing their copy of
> > run_build.pl with the bleeding edge version. We can't put it in a client
> > release until we fix up the MSVC side of things.
>
> I guess I will have to find someone to assist me in architecting a
> solution for the MSVC stuff.
>
What's the matter here? Do we need to extend vcregress.pl with a new mode
to test stuff in src/test/modules?
--
Michael


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 12:45:54
Message-ID: 20141217124554.GA1768@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Michael Paquier wrote:
> On Wed, Dec 17, 2014 at 6:02 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
> >
> > Andrew Dunstan wrote:

> > > Any brave buildfarm owners on *nix can try it by replacing their copy of
> > > run_build.pl with the bleeding edge version. We can't put it in a client
> > > release until we fix up the MSVC side of things.
> >
> > I guess I will have to find someone to assist me in architecting a
> > solution for the MSVC stuff.
> >
> What's the matter here? Do we need to extend vcregress.pl with a new mode
> to test stuff in src/test/modules?

Please see my message
http://www.postgresql.org/message-id/20141128205453.GA1737@alvh.no-ip.org

The -msvc patch attached there adds some support to Mkvcbuild.pm and
vcregress.pl, but it doesn't completely work (fails to install).

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 15:23:04
Message-ID: 6927.1418829784@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 12/16/2014 04:44 PM, Tom Lane wrote:
>> I've put this in dromedary as well (though the HEAD build that's running
>> right this moment is still using the 4.13 script). I take it I don't need
>> to adjust the configuration file?

> Nope, no config changes required.

As seems blindingly obvious in hindsight, both crake and dromedary are
now red in every branch but HEAD.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 16:34:25
Message-ID: 5491B091.3020805@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 12/17/2014 10:23 AM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 12/16/2014 04:44 PM, Tom Lane wrote:
>>> I've put this in dromedary as well (though the HEAD build that's running
>>> right this moment is still using the 4.13 script). I take it I don't need
>>> to adjust the configuration file?
>> Nope, no config changes required.
> As seems blindingly obvious in hindsight, both crake and dromedary are
> now red in every branch but HEAD.
>
>

Oh, darn, I thought we had a version check. Will fix.

cheers

andrew
>


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 16:59:59
Message-ID: 5491B68F.3040900@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 12/17/2014 11:34 AM, Andrew Dunstan wrote:
>
> On 12/17/2014 10:23 AM, Tom Lane wrote:
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> On 12/16/2014 04:44 PM, Tom Lane wrote:
>>>> I've put this in dromedary as well (though the HEAD build that's
>>>> running
>>>> right this moment is still using the 4.13 script). I take it I
>>>> don't need
>>>> to adjust the configuration file?
>>> Nope, no config changes required.
>> As seems blindingly obvious in hindsight, both crake and dromedary are
>> now red in every branch but HEAD.
>>
>>
>
>
> Oh, darn, I thought we had a version check. Will fix.
>
>

OK, I have committed a fix. Revised script is at
<https://raw.githubusercontent.com/PGBuildFarm/client-code/fca43683c9ec0a3d4dbbe636b7530010b8ef5213/run_build.pl>

I have set crake to do runs that should clear the errors:

cd root && for f in REL*; do touch $f/crake.force-one-run; done

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 18:02:07
Message-ID: 4602.1418839327@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 12/17/2014 11:34 AM, Andrew Dunstan wrote:
>> Oh, darn, I thought we had a version check. Will fix.

> OK, I have committed a fix. Revised script is at
> <https://raw.githubusercontent.com/PGBuildFarm/client-code/fca43683c9ec0a3d4dbbe636b7530010b8ef5213/run_build.pl>

Pulled into dromedary, thanks.

> I have set crake to do runs that should clear the errors:
> cd root && for f in REL*; do touch $f/crake.force-one-run; done

Cool, was just wondering what was the easiest way to force that.
Maybe this should be documented on the buildfarm how-to page?

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]
Date: 2014-12-17 19:00:39
Message-ID: 5491D2D7.2010807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 12/17/2014 01:02 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 12/17/2014 11:34 AM, Andrew Dunstan wrote:
>>> Oh, darn, I thought we had a version check. Will fix.
>> OK, I have committed a fix. Revised script is at
>> <https://raw.githubusercontent.com/PGBuildFarm/client-code/fca43683c9ec0a3d4dbbe636b7530010b8ef5213/run_build.pl>
> Pulled into dromedary, thanks.
>
>> I have set crake to do runs that should clear the errors:
>> cd root && for f in REL*; do touch $f/crake.force-one-run; done
> Cool, was just wondering what was the easiest way to force that.
> Maybe this should be documented on the buildfarm how-to page?
>
>

Done.

cheers

andrew