Allow valgrind tests to be skipped with an environment variable.

This commit is contained in:
Andrew Wood
2024-12-07 02:20:04 +00:00
parent bb339ba519
commit 97c48c8901
+5
View File
@@ -30,6 +30,11 @@ if ! command -v valgrind >/dev/null 2>&1; then
exit 77
fi
if test "${SKIP_VALGRIND_TESTS}" = "1"; then
echo "SKIP_VALGRIND_TESTS is set"
exit 77
fi
valgrindHelp="$(valgrind --help 2>&1)"
for valgrindOption in "verbose" "show-error-list" "error-exitcode" "track-fds" "leak-check"; do
echo "${valgrindHelp}" | grep -Fq "${valgrindOption}" || { echo "test requires \`valgrind --${valgrindOption}'"; exit 77; }