mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
ci: Add missing "set -e" to scripts run by su.
If any shell command fails, the whole script should fail. To avoid future omissions, add this even for single-command scripts that use su with heredoc syntax, as they might be extended or copied-and-pasted. Extracted from a larger patch that wanted to use #error during compilation, leading to the diagnosis of this problem. Reviewed-by: Tristan Partin <tristan@partin.io> (earlier version) Discussion: https://postgr.es/m/DDZP25P4VZ48.3LWMZBGA1K9RH%40partin.io Backpatch-through: 15
This commit is contained in:
@@ -76,6 +76,7 @@ task:
|
|||||||
# freebsd already takes longer than other platforms except for windows.
|
# freebsd already takes longer than other platforms except for windows.
|
||||||
configure_script: |
|
configure_script: |
|
||||||
su postgres <<-EOF
|
su postgres <<-EOF
|
||||||
|
set -e
|
||||||
./configure \
|
./configure \
|
||||||
--enable-cassert --enable-debug --enable-tap-tests \
|
--enable-cassert --enable-debug --enable-tap-tests \
|
||||||
--enable-nls \
|
--enable-nls \
|
||||||
@@ -181,6 +182,7 @@ task:
|
|||||||
|
|
||||||
configure_script: |
|
configure_script: |
|
||||||
su postgres <<-EOF
|
su postgres <<-EOF
|
||||||
|
set -e
|
||||||
./configure \
|
./configure \
|
||||||
--enable-cassert --enable-debug --enable-tap-tests \
|
--enable-cassert --enable-debug --enable-tap-tests \
|
||||||
--enable-nls \
|
--enable-nls \
|
||||||
@@ -198,6 +200,7 @@ task:
|
|||||||
|
|
||||||
test_world_script: |
|
test_world_script: |
|
||||||
su postgres <<-EOF
|
su postgres <<-EOF
|
||||||
|
set -e
|
||||||
ulimit -c unlimited # default is 0
|
ulimit -c unlimited # default is 0
|
||||||
make -s ${CHECK} ${CHECKFLAGS} -j${TEST_JOBS}
|
make -s ${CHECK} ${CHECKFLAGS} -j${TEST_JOBS}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user