Change the exit code for valgrind so that we can detect issues.

This commit is contained in:
Mark VanderVoord
2026-06-30 22:15:29 -04:00
parent 61f6f2991b
commit 895d066157
+6 -1
View File
@@ -112,6 +112,11 @@ jobs:
failed=0
for exe in test/system/build/test_*.exe; do
echo "Checking: $exe"
valgrind --leak-check=full --track-origins=yes --error-exitcode=1 "$exe" || failed=1
# Use exit code 42 to distinguish valgrind errors from Unity test failures.
# Some executables intentionally contain tests expected to fail (testing CMock's
# error-handling), so Unity exits non-zero. --error-exitcode=42 only fires when
# valgrind itself detects errors, letting Unity's exit code pass through otherwise.
valgrind --leak-check=full --track-origins=yes --error-exitcode=42 "$exe"
[ $? -eq 42 ] && failed=1
done
exit $failed