]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix portability issue in pg_upgrade test script: avoid $PWD.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Jul 2015 16:49:18 +0000 (12:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Jul 2015 16:49:18 +0000 (12:49 -0400)
commitebe601c4daf3cdcde5156d941a6ae880ab94c7cd
treeea74c729785f7edd2598b1ca8c5a70dfa637e757
parent6d88c1fc5f2eba341186e13dc9ab4a0ca8eeeeba
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.
contrib/pg_upgrade/test.sh