mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
pgtest: run clean, build, and check stages separately
This allows for cleaner error reporting. Backpatch-through: 9.5
This commit is contained in:
parent
9a13e7f0f0
commit
d524a11a72
@ -19,15 +19,25 @@ mkdir /tmp/$$
|
|||||||
TMP="/tmp/$$"
|
TMP="/tmp/$$"
|
||||||
|
|
||||||
if [ "X$1" != "X-n" ]
|
if [ "X$1" != "X-n" ]
|
||||||
then PGCLEAN=clean
|
then CLEAN="Y"
|
||||||
else shift
|
else CLEAN=""
|
||||||
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f tmp_install/log/install.log
|
rm -f tmp_install/log/install.log
|
||||||
|
|
||||||
# Run "make check" and store return code in $TMP/ret.
|
# Run "make check" and store return code in $TMP/ret.
|
||||||
# Display output but also capture it in $TMP/0.
|
# Display output but also capture it in $TMP/0.
|
||||||
($MAKE "$@" $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee $TMP/0
|
(
|
||||||
|
if [ "$CLEAN" ]
|
||||||
|
then $MAKE "$@" clean 2>&1
|
||||||
|
echo "$?" > $TMP/ret
|
||||||
|
fi
|
||||||
|
if [ $(cat $TMP/ret) -eq 0 ]
|
||||||
|
then $MAKE "$@" 2>&1 && $MAKE "$@" check 2>&1
|
||||||
|
echo "$?" > $TMP/ret
|
||||||
|
fi
|
||||||
|
) | tee $TMP/0
|
||||||
|
|
||||||
# Grab possible warnings from install.log
|
# Grab possible warnings from install.log
|
||||||
[ -e tmp_install/log/install.log ] && cat tmp_install/log/install.log >> $TMP/0
|
[ -e tmp_install/log/install.log ] && cat tmp_install/log/install.log >> $TMP/0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user