postgres.git / summary / log / commit / refs

commit    5e6377bcbcdcaf11106ddc1ed583f3548ce47a21
Author:   Andres Freund <andres@anarazel.de>
Date:     Thu May 23 21:59:16 2019 +0000
First released in: 12.0, 9.4.23, 9.5.18, 9.6.14, 10.9, 11.4

    pg_upgrade: Make test.sh's installcheck use to-be-upgraded version's bindir.
    
    On master (after 700538) the old version's installed psql was used -
    even when the old version might not actually be installed / might be
    installed into a temporary directory. As commonly the case when just
    executing make check for pg_upgrade, as $oldbindir is just the current
    version's $bindir.
    
    In the back branches, with --install specified, psql from the new
    version's temporary installation was used, without --install (e.g for
    NO_TEMP_INSTALL, cf 47b3c26642), the new version's installed psql was
    used (which might or might not exist).
    
    Author: Andres Freund
    Discussion: https://postgr.es/m/20190522175150.c26f4jkqytahajdg@alap3.anarazel.de


contrib/pg_upgrade/test.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh index 126d5d16066..5062ff0ea67 100644 --- a/contrib/pg_upgrade/test.sh +++ b/contrib/pg_upgrade/test.sh @@ -84,14 +84,6 @@ if [ "$1" = '--install' ]; then LIBPATH=$libdir:$LIBPATH export LIBPATH PATH=$libdir:$PATH - - # We need to make it use psql from our temporary installation, - # because otherwise the installcheck run below would try to - # use psql from the proper installation directory, which might - # be outdated or missing. But don't override anything else that's - # already in EXTRA_REGRESS_OPTS. - EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --psqldir=$bindir" - export EXTRA_REGRESS_OPTS fi : ${oldbindir=$bindir} @@ -100,6 +92,14 @@ fi oldsrc=`cd "$oldsrc" && pwd` newsrc=`cd ../.. && pwd` +# We need to make pg_regress use psql from the desired installation +# (likely a temporary one), because otherwise the installcheck run +# below would try to use psql from the proper installation directory +# of the target version, which might be outdated or not exist. But +# don't override anything else that's already in EXTRA_REGRESS_OPTS. +EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --psqldir='$oldbindir'" +export EXTRA_REGRESS_OPTS + PATH=$bindir:$PATH export PATH [parent: d93ba74c22c2]