add valgrind.sh

For running station-sniffer (or the test clients) under valgrind
(memcheck)

Signed-off-by: Tucker Polomik <t.polomik@cablelabs.com>
This commit is contained in:
Tucker Polomik
2023-02-08 12:09:40 -07:00
parent 5a7e8ee158
commit 0a0a6a22b8

9
valgrind.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
VALGRIND="valgrind"
if ! [ -x "$(command -v ${VALGRIND})" ]; then
echo "{$VALGRIND} not found. skipping..."
exit 1
fi
valgrind --error-exitcode=1 --tool=memcheck --leak-check=full --track-origins=yes -q --error-limit=no --gen-suppressions=all "$@"