Skip to content

Commit bfb5710

Browse files
committed
Check for seg fault message
1 parent 232a735 commit bfb5710

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,13 @@ jobs:
512512
run: |
513513
set +e
514514
cd build
515-
./tst/producer_test --gtest_filter="ProducerClientBasicTest.*"
516-
TEST_EXIT_CODE=$?
517-
if [ $TEST_EXIT_CODE -eq 0 ]; then
518-
echo "The test passed, but it should have failed!"
515+
TEST_OUTPUT=$(./tst/producer_test --gtest_filter="ProducerClientBasicTest.*" 2>&1)
516+
echo "$TEST_OUTPUT"
517+
518+
if echo "$TEST_OUTPUT" | grep -q "Segmentation fault"; then
519+
echo "The tests failed with a segmentation fault detected as expected."
520+
else
521+
echo "The test did not fail with a segmentation fault as expected!"
519522
exit 1
520523
fi
521-
echo "Test failed as expected."
522524
shell: bash

0 commit comments

Comments
 (0)