Обсуждение: Re: [alvherre@2ndquadrant.com: Re: no test programs in contrib]

Поиск
Список
Период
Сортировка

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

От
Alvaro Herrera
Дата:
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',\@makeout);
> +    print "======== make testmodules log ===========\n",@makeout if ($verbose > 1);
> +    send_result('TestModules',$status,\@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',\@makeout);
> +    print "======== make testmodules install log ===========\n",@makeout
> +      if ($verbose > 1);
> +    send_result('TestModulesInstall',$status,\@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",\@checklog);
> +    print "======== make testmodules installcheck log ===========\n",@checklog
> +      if ($verbose > 1);
> +    send_result("TestModulesCheck-$locale",$status,\@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)



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

От
Andrew Dunstan
Дата:


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



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

От
Andrew Dunstan
Дата:
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






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

От
Alvaro Herrera
Дата:
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



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

От
Andrew Dunstan
Дата:
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



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

От
Tom Lane
Дата:
Andrew Dunstan <andrew@dunslane.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



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

От
Andrew Dunstan
Дата:
On 12/16/2014 04:44 PM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.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



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

От
Michael Paquier
Дата:
<div dir="ltr"><br /><div class="gmail_extra"><br /><div class="gmail_quote">On Wed, Dec 17, 2014 at 6:02 AM, Alvaro
Herrera<span dir="ltr"><<a href="mailto:alvherre@2ndquadrant.com"
target="_blank">alvherre@2ndquadrant.com</a>></span>wrote:<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex"><span class="">Andrew Dunstan wrote:<br /><br /> > I have pushed
thischange, and crake will be running the code. See <<a
href="https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e"
target="_blank">https://github.com/PGBuildFarm/client-code/commit/d656c1c3ce46f290791c5ba5ede2f8ac8dfa342e</a>><br
/><br/></span>Crake just uploaded its first test results with the testmodules stuff<br /> working:<br /><a
href="http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2014-12-16%2020%3A46%3A04"
target="_blank">http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2014-12-16%2020%3A46%3A04</a><br
/><br/> Thanks for setting it up.<br /><span class=""><br /> > Any brave buildfarm owners on *nix can try it by
replacingtheir copy of<br /> > <a href="http://run_build.pl" target="_blank">run_build.pl</a> with the bleeding edge
version.We can't put it in a client<br /> > release until we fix up the MSVC side of things.<br /><br /></span>I
guessI will have to find someone to assist me in architecting a<br /> solution for the MSVC stuff.<br
/></blockquote></div>What'sthe matter here? Do we need to extend <a href="http://vcregress.pl">vcregress.pl</a> with a
newmode to test stuff in src/test/modules?<br />-- <br /><div class="gmail_signature">Michael<br /></div></div></div> 

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

От
Alvaro Herrera
Дата:
Michael Paquier wrote:
> On Wed, Dec 17, 2014 at 6:02 AM, Alvaro Herrera <alvherre@2ndquadrant.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



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

От
Tom Lane
Дата:
Andrew Dunstan <andrew@dunslane.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



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

От
Andrew Dunstan
Дата:
On 12/17/2014 10:23 AM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.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
>




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

От
Andrew Dunstan
Дата:
On 12/17/2014 11:34 AM, Andrew Dunstan wrote:
>
> On 12/17/2014 10:23 AM, Tom Lane wrote:
>> Andrew Dunstan <andrew@dunslane.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




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

От
Tom Lane
Дата:
Andrew Dunstan <andrew@dunslane.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



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

От
Andrew Dunstan
Дата:
On 12/17/2014 01:02 PM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.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