From 97c48c8901fecd2ed28394eab0e4da956683db23 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sat, 7 Dec 2024 02:20:04 +0000 Subject: [PATCH] Allow valgrind tests to be skipped with an environment variable. --- tests/run-valgrind.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/run-valgrind.sh b/tests/run-valgrind.sh index 337000b..4634324 100755 --- a/tests/run-valgrind.sh +++ b/tests/run-valgrind.sh @@ -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; }