Skip to content

Commit e2c0df7

Browse files
committed
pgtest: run clean, build, and check stages separately
This allows for cleaner error reporting. Backpatch-through: 9.5
1 parent 244142d commit e2c0df7

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/tools/pgtest

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,25 @@ mkdir /tmp/$$
1919
TMP="/tmp/$$"
2020

2121
if [ "X$1" != "X-n" ]
22-
then PGCLEAN=clean
23-
else shift
22+
then CLEAN="Y"
23+
else CLEAN=""
24+
shift
2425
fi
2526

2627
rm -f tmp_install/log/install.log
2728

2829
# Run "make check" and store return code in $TMP/ret.
2930
# Display output but also capture it in $TMP/0.
30-
($MAKE "$@" $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee $TMP/0
31+
(
32+
if [ "$CLEAN" ]
33+
then $MAKE "$@" clean 2>&1
34+
echo "$?" > $TMP/ret
35+
fi
36+
if [ $(cat $TMP/ret) -eq 0 ]
37+
then $MAKE "$@" 2>&1 && $MAKE "$@" check 2>&1
38+
echo "$?" > $TMP/ret
39+
fi
40+
) | tee $TMP/0
3141

3242
# Grab possible warnings from install.log
3343
[ -e tmp_install/log/install.log ] && cat tmp_install/log/install.log >> $TMP/0

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