mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 10:11:29 +08:00
When the regression tests output differs between PG versions we create a template test file (*.sql.in) and add several different output files for each supported version. Over time we support new PG version and deprecate older ones, for example nowadays we're working on PG16 support and removed PG12 so we need to check if we still need template files.
18 lines
486 B
Bash
Executable File
18 lines
486 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ERROR=0
|
|
|
|
for FILE in $(git ls-files test/sql/*.sql.in tsl/test/sql/*.sql.in)
|
|
do
|
|
DIRNAME=$(dirname "${FILE}" | sed 's/sql/expected/g')
|
|
TESTNAME=$(basename "${FILE}" .sql.in)
|
|
|
|
if diff --from-file ${DIRNAME}/${TESTNAME}-*.out > /dev/null 2>&1; then
|
|
echo "ERROR: all template output test files are equal: \"${DIRNAME}/${TESTNAME}-*.out\""
|
|
echo "HINT: Please turn template test file \"${FILE}\" into a regular test file"
|
|
ERROR=1
|
|
fi
|
|
done
|
|
|
|
exit ${ERROR}
|