diff options
Diffstat (limited to 'storage/tokudb/PerconaFT/portability/tests/ensure_memcheck_fails.sh')
-rwxr-xr-x | storage/tokudb/PerconaFT/portability/tests/ensure_memcheck_fails.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/storage/tokudb/PerconaFT/portability/tests/ensure_memcheck_fails.sh b/storage/tokudb/PerconaFT/portability/tests/ensure_memcheck_fails.sh new file mode 100755 index 00000000000..9b3f50f857d --- /dev/null +++ b/storage/tokudb/PerconaFT/portability/tests/ensure_memcheck_fails.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +test $# -ge 1 || exit 1 + +bin=$1; shift +valgrind=$@ + +$valgrind --log-file=$bin.check.valgrind $bin >$bin.check.output 2>&1 +if [[ $? = 0 ]] +then + lines=$(cat $bin.check.valgrind | wc -l) + if [[ lines -ne 0 ]] + then + cat $bin.check.valgrind + exit 0 + else + exit 1 + fi +else + exit 0 +fi |