Skip to content

Commit 9d0383c

Browse files
committed
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.
1 parent b3b7f78 commit 9d0383c

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/bin/pg_upgrade/test.sh

+16-9
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,23 @@ standard_initdb 'initdb'
230230

231231
pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir" -p "$PGPORT" -P "$PGPORT"
232232

233-
# make sure all directories and files have group permissions
234-
if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then
235-
echo "files in PGDATA with permission != 640";
236-
exit 1;
237-
fi
233+
# make sure all directories and files have group permissions, on Unix hosts
234+
# Windows hosts don't support Unix-y permissions.
235+
case $testhost in
236+
MINGW*) ;;
237+
*) if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then
238+
echo "files in PGDATA with permission != 640";
239+
exit 1;
240+
fi ;;
241+
esac
238242

239-
if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then
240-
echo "directories in PGDATA with permission != 750";
241-
exit 1;
242-
fi
243+
case $testhost in
244+
MINGW*) ;;
245+
*) if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then
246+
echo "directories in PGDATA with permission != 750";
247+
exit 1;
248+
fi ;;
249+
esac
243250

244251
pg_ctl start -l "$logdir/postmaster2.log" -o "$POSTMASTER_OPTS" -w
245252

0 commit comments

Comments
 (0)