File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -512,13 +512,13 @@ jobs:
512
512
run : |
513
513
set +e
514
514
cd build
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!"
515
+ ./tst/producer_test --gtest_filter="ProducerClientBasicTest.*"
516
+ TEST_EXIT_CODE=$?
517
+
518
+ # 128 (abnormal exit) + 11 (segmentation fault) = 139
519
+ if [ $TEST_EXIT_CODE -ne 139 ]; then
520
+ echo "Unexpected exit code: $TEST_EXIT_CODE"
522
521
exit 1
523
522
fi
523
+ echo "Test exited as expected with code $TEST_EXIT_CODE."
524
524
shell : bash
You can’t perform that action at this time.
0 commit comments