Skip to content

Commit

Permalink
[Tests] Fix cpp build not failing when tests fail (apache#11575)
Browse files Browse the repository at this point in the history
### Motivation

- fixes issue that cpp build doesn't fail when tests fail
- merge after apache#11557

### Additional context

- apache#11557 (comment)
- https://github.com/apache/pulsar/pull/10309/files#r683626563

### Modifications 

- `set -o pipefail;` is required when using `| cat`
  • Loading branch information
lhotari authored and LeBW committed Aug 9, 2021
1 parent a16063f commit a8140ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulsar-client-cpp/docker-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DISABLE_COLOR_OUTPUT=""
if [ "$GTEST_COLOR" = "no" ]; then
DISABLE_COLOR_OUTPUT="| cat"
fi
$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && ./run-unit-tests.sh ${tests} $DISABLE_COLOR_OUTPUT"
$DOCKER_CMD bash -c "set -o pipefail; cd /pulsar/pulsar-client-cpp && ./run-unit-tests.sh ${tests} $DISABLE_COLOR_OUTPUT"
RES=$?
if [ $RES -ne 0 ]; then
(
Expand Down

0 comments on commit a8140ae

Please sign in to comment.