pgsql: Improve speed of make check-world

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

pgsql: Improve speed of make check-world

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Improve speed of make check-world

Before, make check-world would create a new temporary installation for
each test suite, which is slow and wasteful.  Instead, we now create one
test installation that is used by all test suites that are part of a
make run.

The management of the temporary installation is removed from pg_regress
and handled in the makefiles.  This allows for better control, and
unifies the code with that of test suites not run through pg_regress.

review and msvc support by Michael Paquier 

more review by Fabien Coelho 

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dcae5faccab64776376d354decda0017c648bb53

Modified Files
--------------
.gitignore                         |    1 +
GNUmakefile.in                     |    1 +
contrib/earthdistance/Makefile     |    2 +-
contrib/test_decoding/Makefile     |   16 ++-
src/Makefile.global.in             |   30 +++--
src/bin/pg_upgrade/test.sh         |    2 +-
src/interfaces/ecpg/test/Makefile  |   10 +-
src/makefiles/pgxs.mk              |    7 +-
src/pl/plperl/GNUmakefile          |    2 -
src/pl/plpython/Makefile           |    3 -
src/pl/tcl/Makefile                |    2 -
src/test/isolation/Makefile        |   15 +--
src/test/regress/GNUmakefile       |    4 -
src/test/regress/pg_regress.c      |  234 +++++++++---------------------------
src/test/regress/pg_regress.h      |    6 -
src/test/regress/pg_regress_main.c |    4 +-
src/tools/msvc/vcregress.pl        |   67 +++++++----
17 files changed, 145 insertions(+), 261 deletions(-)

Re: pgsql: Improve speed of make check-world

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:


On 04/23/2015 10:11 AM, Peter Eisentraut wrote:
> Improve speed of make check-world
>
> Before, make check-world would create a new temporary installation for
> each test suite, which is slow and wasteful.  Instead, we now create one
> test installation that is used by all test suites that are part of a
> make run.
>
> The management of the temporary installation is removed from pg_regress
> and handled in the makefiles.  This allows for better control, and
> unifies the code with that of test suites not run through pg_regress.
>
> review and msvc support by Michael Paquier 
>
> more review by Fabien Coelho 


This has caused some buildfarm breakage, in the module that runs the 
collate.linux.utf8 test.

Currently it is coded to run like this:

    my @checklog;
    my $cmd ="./pg_regress --psqldir=$installdir/bin --dlpath=. "
       ."$inputdir --port=$buildport collate.linux.utf8";
    @checklog = `cd $pgsql/src/test/regress && $cmd 2>&1`;

and the error it now gets is:

    ./pg_regress: unrecognized option '--psqldir=/home/bf/bfr/root/HEAD/inst/bin'

TBH I'm not 100% convinced that removing the ability to have pg_regress 
handle temprary installation management is a good thing.

cheers

andrew

Re: pgsql: Improve speed of make check-world

От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Peter Eisentraut wrote:
> Improve speed of make check-world
> 
> Before, make check-world would create a new temporary installation for
> each test suite, which is slow and wasteful.  Instead, we now create one
> test installation that is used by all test suites that are part of a
> make run.

Maybe I'm confused, but now "make -C doc/src/sgml check" seems to build
the whole backend; it didn't do so before, and I think that's quite
pointless.  I take it that's unintended?  Can we get the old behavior
back?

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

Re: pgsql: Improve speed of make check-world

От:
Bruce Momjian <bruce@momjian.us>
Дата:
Вложения:
On Tue, May  5, 2015 at 03:02:50PM -0300, Alvaro Herrera wrote:
> Peter Eisentraut wrote:
> > Improve speed of make check-world
> > 
> > Before, make check-world would create a new temporary installation for
> > each test suite, which is slow and wasteful.  Instead, we now create one
> > test installation that is used by all test suites that are part of a
> > make run.
> 
> Maybe I'm confused, but now "make -C doc/src/sgml check" seems to build
> the whole backend; it didn't do so before, and I think that's quite
> pointless.  I take it that's unintended?  Can we get the old behavior
> back?

Yes, I found this odd too.  It is caused by this commit:

	commit dcae5faccab64776376d354decda0017c648bb53
	Author: Peter Eisentraut 
	Date:   Thu Apr 23 08:59:52 2015 -0400
	
	    Improve speed of make check-world

It basically added a'check' target dependency of 'temp-install' to
Makefile.global.in, which added it to every Makefile containing a
'check' target.

While you can't easily add rule action to an existing target, you can
easily add dependencies by just mentioning the target multiple times,
e.g.

	check: dep1
        
	check: dep2
        
	dep1:
		echo 1
        
	dep2:
		echo 2


Running 'make check' will output '1 2'.

Now, of course many check's need temp-install, but the SGML build does
not.  The attached diff uses a symbol defined in doc/src/sgml/Makefile
(GENERATED_SGML) to supress the temp-install target rule action.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Re: pgsql: Improve speed of make check-world

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Sat, May  9, 2015 at 02:02:15PM -0400, Bruce Momjian wrote:
> Yes, I found this odd too.  It is caused by this commit:
> 
> 	commit dcae5faccab64776376d354decda0017c648bb53
> 	Author: Peter Eisentraut 
> 	Date:   Thu Apr 23 08:59:52 2015 -0400
> 	
> 	    Improve speed of make check-world
> 
> It basically added a'check' target dependency of 'temp-install' to
> Makefile.global.in, which added it to every Makefile containing a
> 'check' target.
> 
> While you can't easily add rule action to an existing target, you can
> easily add dependencies by just mentioning the target multiple times,
> e.g.
> 
> 	check: dep1
>         
> 	check: dep2
>         
> 	dep1:
> 		echo 1
>         
> 	dep2:
> 		echo 2
> 
> 
> Running 'make check' will output '1 2'.
> 
> Now, of course many check's need temp-install, but the SGML build does
> not.  The attached diff uses a symbol defined in doc/src/sgml/Makefile
> (GENERATED_SGML) to supress the temp-install target rule action.

Patch applied, with added Makefile comment.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Re: pgsql: Improve speed of make check-world

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Tue, May 12, 2015 at 11:01:49AM -0400, Bruce Momjian wrote:
> > While you can't easily add rule action to an existing target, you can
> > easily add dependencies by just mentioning the target multiple times,
> > e.g.
> > 
> > 	check: dep1
> >         
> > 	check: dep2
> >         
> > 	dep1:
> > 		echo 1
> >         
> > 	dep2:
> > 		echo 2
> > 
> > 
> > Running 'make check' will output '1 2'.
> > 
> > Now, of course many check's need temp-install, but the SGML build does
> > not.  The attached diff uses a symbol defined in doc/src/sgml/Makefile
> > (GENERATED_SGML) to supress the temp-install target rule action.
> 
> Patch applied, with added Makefile comment.

This patch has broken the build farm, and I am fixing it now.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Re: pgsql: Improve speed of make check-world

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Tue, May 12, 2015 at 12:24:17PM -0400, Bruce Momjian wrote:
> > > Running 'make check' will output '1 2'.
> > > 
> > > Now, of course many check's need temp-install, but the SGML build does
> > > not.  The attached diff uses a symbol defined in doc/src/sgml/Makefile
> > > (GENERATED_SGML) to supress the temp-install target rule action.
> > 
> > Patch applied, with added Makefile comment.
> 
> This patch has broken the build farm, and I am fixing it now.

Fixed.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

FAQ