mariadb/portability/tests/ensure_memcheck_fails.sh
Leif Walsh eb81104629 refs #5368 use /usr/bin/env bash instead of /bin/bash for scripts
git-svn-id: file:///svn/toku/tokudb@48325 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-17 00:01:10 -04:00

21 lines
340 B
Bash
Executable file

#!/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