Skip to content

Commit

Permalink
[Tests] Fix cpp build not failing when tests fail (#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 #11557

### Additional context

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

### Modifications

- `set -o pipefail;` is required when using `| cat`

(cherry picked from commit 5ae0554)
  • Loading branch information
lhotari authored and hangc0276 committed Aug 11, 2021
1 parent 4befb41 commit 3ad5266
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 3ad5266

Please sign in to comment.