aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2018-04-08 22:50:00 -0400
committerStephen Frost <sfrost@snowman.net>2018-04-08 22:50:00 -0400
commit9d0383c015aabd7565f3df010a5ff56b46aa8756 (patch)
tree5c4b2592f951a6dab59135f60f5f1dbe43d681f8
parentb3b7f7898f17009912b3fc16620d042ec8482557 (diff)
downloadpostgresql-9d0383c015aabd7565f3df010a5ff56b46aa8756.tar.gz
postgresql-9d0383c015aabd7565f3df010a5ff56b46aa8756.zip
Skip permissions test under MINGW/Windows
We don't support the same kind of permissions tests on Windows/MINGW, so these tests really shouldn't be getting run on that platform. Per buildfarm.
-rw-r--r--src/bin/pg_upgrade/test.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh
index 24631a91c61..a80501895b1 100644
--- a/src/bin/pg_upgrade/test.sh
+++ b/src/bin/pg_upgrade/test.sh
@@ -230,16 +230,23 @@ standard_initdb 'initdb'
pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir" -p "$PGPORT" -P "$PGPORT"
-# make sure all directories and files have group permissions
-if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then
- echo "files in PGDATA with permission != 640";
- exit 1;
-fi
+# make sure all directories and files have group permissions, on Unix hosts
+# Windows hosts don't support Unix-y permissions.
+case $testhost in
+ MINGW*) ;;
+ *) if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then
+ echo "files in PGDATA with permission != 640";
+ exit 1;
+ fi ;;
+esac
-if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then
- echo "directories in PGDATA with permission != 750";
- exit 1;
-fi
+case $testhost in
+ MINGW*) ;;
+ *) if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then
+ echo "directories in PGDATA with permission != 750";
+ exit 1;
+ fi ;;
+esac
pg_ctl start -l "$logdir/postmaster2.log" -o "$POSTMASTER_OPTS" -w