mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 01:04:19 +01:00
22 lines
332 B
Bash
22 lines
332 B
Bash
|
#!/bin/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
|