Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3eae0cb

Browse files
committed
Fix headerscheck and cpluspluscheck's exit codes.
For the benefit of CI, which started running these header check scriptsin its CompilerWarnings task in commit81b9f23, they should reportfailure if any individual header failed to compile.Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Reviewed-by: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/CA%2BhUKGKtDwPo9wzKgbStDwfOhEpywMc6PQofio8fAHR7yUjgxw%40mail.gmail.com
1 parent75ca8c1 commit3eae0cb

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

‎src/tools/pginclude/cpluspluscheck

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ tmp=`mktemp -d /tmp/$me.XXXXXX`
5252

5353
trap'rm -rf $tmp' 0 1 2 3 15
5454

55+
exit_status=0
56+
5557
# Scan all of src/ and contrib/ for header files.
5658
forfin`cd"$srcdir"&& find src contrib -name'*.h' -print`
5759
do
@@ -167,9 +169,13 @@ do
167169
esac
168170

169171
# Run the test.
170-
${CXX:-g++} -I$builddir -I$srcdir \
172+
if!${CXX:-g++} -I$builddir -I$srcdir \
171173
-I$builddir/src/include -I$srcdir/src/include \
172174
-I$builddir/src/interfaces/libpq -I$srcdir/src/interfaces/libpq \
173175
$EXTRAINCLUDES$EXTRAFLAGS$CXXFLAGS -c$tmp/test.cpp
174-
176+
then
177+
exit_status=1
178+
fi
175179
done
180+
181+
exit$exit_status

‎src/tools/pginclude/headerscheck

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ tmp=`mktemp -d /tmp/$me.XXXXXX`
4848

4949
trap'rm -rf $tmp' 0 1 2 3 15
5050

51+
exit_status=0
52+
5153
# Scan all of src/ and contrib/ for header files.
5254
forfin`cd"$srcdir"&& find src contrib -name'*.h' -print`
5355
do
@@ -150,9 +152,13 @@ do
150152
esac
151153

152154
# Run the test.
153-
${CC:-gcc}$CPPFLAGS$CFLAGS -I$builddir -I$srcdir \
155+
if!${CC:-gcc}$CPPFLAGS$CFLAGS -I$builddir -I$srcdir \
154156
-I$builddir/src/include -I$srcdir/src/include \
155157
-I$builddir/src/interfaces/libpq -I$srcdir/src/interfaces/libpq \
156158
$EXTRAINCLUDES$EXTRAFLAGS -c$tmp/test.c -o$tmp/test.o
157-
159+
then
160+
exit_status=1
161+
fi
158162
done
163+
164+
exit$exit_status

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp