[Tests] Fix cpp build not failing when tests fail
### Motivation
fixes issue that cpp build doesn't fail when tests fail
merge after
### Additional context
### Modifications
`set -o pipefail;` is required when using `| cat`
@@ -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
(
