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 |
Thread: | |
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 | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-12-16 14:41:46 | Re: Comment typo in typedef struct BrinTuple |
Previous Message | Michael Paquier | 2014-12-16 14:30:37 | Re: [REVIEW] Re: Compression of full-page-writes |