From 5ae05544905790791223fc57c242724a9c009fa7 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Mon, 9 Aug 2021 04:11:55 +0300 Subject: [PATCH] [Tests] Fix cpp build not failing when tests fail (#11575) ### Motivation - fixes issue that cpp build doesn't fail when tests fail - merge after #11557 ### Additional context - https://github.com/apache/pulsar/pull/11557#issuecomment-893422981 - https://github.com/apache/pulsar/pull/10309/files#r683626563 ### Modifications - `set -o pipefail;` is required when using `| cat` --- pulsar-client-cpp/docker-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-client-cpp/docker-tests.sh b/pulsar-client-cpp/docker-tests.sh index bb6565916dd8f..13de4cc08b524 100755 --- a/pulsar-client-cpp/docker-tests.sh +++ b/pulsar-client-cpp/docker-tests.sh @@ -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 (