Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG16: Removed ignore feature from pg_regress #6228

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion test/pg_regress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ IGNORES=${IGNORES:-}
SKIPS=${SKIPS:-}
PSQL=${PSQL:-psql}
PSQL="${PSQL} -X" # Prevent any .psqlrc files from being executed during the tests
PG_VERSION_MAJOR=$(${PSQL} --version | awk '{print $3}' | sed -e 's![.].*!!')

# check if test matches any of the patterns in a list
# $1 list of patterns or test names
Expand All @@ -50,8 +51,25 @@ if [[ -z ${TEST_SCHEDULE} ]]; then
exit 1;
fi

# PG16 removed the `ignore` feature from `pg_regress`
# so as an wraparound if we have any IGNORES entry then
# we merge it together with SKIPS and cleanup the IGNORES
# https://github.com/postgres/postgres/commit/bd8d453e9b5f8b632a400a9e796fc041aed76d82
if [[ ${PG_VERSION_MAJOR} -ge 16 ]]; then
if [[ -n ${IGNORES} ]]; then
if [[ -n ${SKIPS} ]]; then
SKIPS="${SKIPS} ${IGNORES}"
else
SKIPS="${IGNORES}"
fi
IGNORES=""
fi
fi

echo "TESTS ${TESTS}"
echo "IGNORES ${IGNORES}"
if [[ ${PG_VERSION_MAJOR} -lt 16 ]]; then
echo "IGNORES ${IGNORES}"
fi
echo "SKIPS ${SKIPS}"

if [[ -z ${TESTS} ]] && [[ -z ${SKIPS} ]] && [[ -z ${IGNORES} ]]; then
Expand Down