Skip to content

Commit 914b130

Browse files
committed
Adjust pgtest coding to be less complex.
1 parent 99ed473 commit 914b130

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/tools/pgtest

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@ TMP="/tmp/$$"
2020

2121
[ "X$1" != "X-n" ] && PGCLEAN=clean
2222

23-
# run make check, capture return code in $TMP/ret, then display
24-
# that but capture it in $TMP/0 too, and return original make
25-
# error code. If that succeded, display captured warnings
26-
27-
($MAKE $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) |
28-
(tee $TMP/0; exit `cat $TMP/ret`) &&
29-
cat $TMP/0 |
30-
# The following grep's have to be adjusted for your setup because
31-
# certain warnings are acceptable.
32-
grep -i warning |
33-
grep -v setproctitle |
34-
grep -v find_rule |
35-
grep -v yy_flex_realloc
23+
# Run "make check" and store return code in $TMP/ret.
24+
# Display output but also capture it in $TMP/0.
25+
($MAKE $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee $TMP/0
26+
27+
# If success, display warnings
28+
if [ $(cat $TMP/ret) -eq 0 ]
29+
then cat $TMP/0 |
30+
# The following grep's have to be adjusted for your setup because
31+
# certain warnings are acceptable.
32+
grep -i warning |
33+
grep -v setproctitle |
34+
grep -v find_rule |
35+
grep -v yy_flex_realloc
36+
fi
3637

3738
# return original make error code
3839
exit `cat $TMP/ret`

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy