run_testsuite: don't fail immediately
Version: 9.6.0-1
This commit is contained in:
parent
97dfdfe4b9
commit
08014984d3
@ -566,23 +566,19 @@ sed "s|C=\`pwd\`;|C=%{_libdir}/pgsql/tutorial;|" < src/tutorial/Makefile > src/t
|
|||||||
make %{?_smp_mflags} -C src/tutorial NO_PGXS=1 all
|
make %{?_smp_mflags} -C src/tutorial NO_PGXS=1 all
|
||||||
rm -f src/tutorial/GNUmakefile
|
rm -f src/tutorial/GNUmakefile
|
||||||
|
|
||||||
test_failure=0
|
|
||||||
|
|
||||||
# run_testsuite WHERE
|
# run_testsuite WHERE
|
||||||
# -------------------
|
# -------------------
|
||||||
# Run 'make check' in WHERE path. When that command fails, return the logs
|
# Run 'make check' in WHERE path. When that command fails, return the logs
|
||||||
# given by PostgreSQL build system and set 'test_failure=1'.
|
# given by PostgreSQL build system and set 'test_failure=1'. This function
|
||||||
|
# never exits directly nor stops rpmbuild where `set -e` is enabled.
|
||||||
|
# all tests if possible).
|
||||||
run_testsuite()
|
run_testsuite()
|
||||||
{
|
{
|
||||||
make -C "$1" MAX_CONNECTIONS=5 check && return 0
|
make -k -C "$1" MAX_CONNECTIONS=5 check && return 0 || test_failure=1
|
||||||
|
|
||||||
test_failure=1
|
|
||||||
|
|
||||||
(
|
(
|
||||||
set +x
|
set +x
|
||||||
echo "=== trying to find all regression.diffs files in build directory ==="
|
echo "=== trying to find all regression.diffs files in build directory ==="
|
||||||
find -name 'regression.diffs' | \
|
find "$1" -name 'regression.diffs' | \
|
||||||
while read line; do
|
while read line; do
|
||||||
echo "=== make failure: $line ==="
|
echo "=== make failure: $line ==="
|
||||||
cat "$line"
|
cat "$line"
|
||||||
@ -590,6 +586,8 @@ run_testsuite()
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_failure=0
|
||||||
|
|
||||||
%if %runselftest
|
%if %runselftest
|
||||||
run_testsuite "src/test/regress"
|
run_testsuite "src/test/regress"
|
||||||
make clean -C "src/test/regress"
|
make clean -C "src/test/regress"
|
||||||
|
Loading…
Reference in New Issue
Block a user