mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-04 04:36:49 +02:00
Fix portability issue in pg_upgrade test script: avoid $PWD.
SUSv2-era shells don't set the PWD variable, though anything more modern does. In the buildfarm environment this could lead to test.sh executing with PWD pointing to $HOME or another high-level directory, so that there were conflicts between concurrent executions of the test in different branch subdirectories. This appears to be the explanation for recent intermittent failures on buildfarm members binturong and dingo (and might well have something to do with the buildfarm script's failure to capture log files from pg_upgrade tests, too). To fix, just use `pwd` in place of $PWD. AFAICS test.sh is the only place in our source tree that depended on $PWD. Back-patch to all versions containing this script. Per buildfarm. Thanks to Oskari Saarenmaa for diagnosing the problem.
This commit is contained in:
parent
414bef30bf
commit
9a8f583310
@ -62,7 +62,8 @@ esac
|
|||||||
POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES -k \"$PGHOST\""
|
POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES -k \"$PGHOST\""
|
||||||
export PGHOST
|
export PGHOST
|
||||||
|
|
||||||
temp_root=$PWD/tmp_check
|
# don't rely on $PWD here, as old shells don't set it
|
||||||
|
temp_root=`pwd`/tmp_check
|
||||||
|
|
||||||
if [ "$1" = '--install' ]; then
|
if [ "$1" = '--install' ]; then
|
||||||
temp_install=$temp_root/install
|
temp_install=$temp_root/install
|
||||||
@ -104,7 +105,7 @@ PGDATA="$BASE_PGDATA.old"
|
|||||||
export PGDATA
|
export PGDATA
|
||||||
rm -rf "$BASE_PGDATA" "$PGDATA"
|
rm -rf "$BASE_PGDATA" "$PGDATA"
|
||||||
|
|
||||||
logdir=$PWD/log
|
logdir=`pwd`/log
|
||||||
rm -rf "$logdir"
|
rm -rf "$logdir"
|
||||||
mkdir "$logdir"
|
mkdir "$logdir"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user