Fix pgtest to return proper error code based on 'make' return code.

This commit is contained in:
Bruce Momjian 2012-08-10 14:10:34 -04:00
parent eaccfded98
commit 99ed473acb
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,10 @@ TMP="/tmp/$$"
[ "X$1" != "X-n" ] && PGCLEAN=clean
# run make check, capture return code in $TMP/ret, then display
# that but capture it in $TMP/0 too, and return original make
# error code. If that succeded, display captured warnings
($MAKE $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) |
(tee $TMP/0; exit `cat $TMP/ret`) &&
cat $TMP/0 |
@ -29,3 +33,6 @@ grep -i warning |
grep -v setproctitle |
grep -v find_rule |
grep -v yy_flex_realloc
# return original make error code
exit `cat $TMP/ret`