From: Bruce Momjian Date: Fri, 10 Aug 2012 18:10:34 +0000 (-0400) Subject: Fix pgtest to return proper error code based on 'make' return code. X-Git-Tag: REL9_3_BETA1~1113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99ed473acb47cb0cda47032e3d2392beca569d59;p=postgresql Fix pgtest to return proper error code based on 'make' return code. --- diff --git a/src/tools/pgtest b/src/tools/pgtest index ffb528302d..c160f58320 100755 --- a/src/tools/pgtest +++ b/src/tools/pgtest @@ -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`