Fix a 'make check' failure when valgrind is not installed.
* src/kripketest/defs.in (run2): Remove this function. It was incorrectly trying to run valgrind even when valgrind is not installed. * src/kripketest/kripke.test: Simplify and use run().
This commit is contained in:
parent
89279d9829
commit
c21e716893
3 changed files with 28 additions and 52 deletions
|
|
@ -89,40 +89,4 @@ run()
|
|||
test $exitcode = $expected_exitcode || exit 1
|
||||
}
|
||||
|
||||
run2()
|
||||
{
|
||||
expected_exitcode=$1
|
||||
shift
|
||||
exitcode=0
|
||||
if test -n "$VALGRIND"; then
|
||||
exec 6>valgrind.err
|
||||
GLIBCPP_FORCE_NEW=1 \
|
||||
../../../libtool --mode=execute \
|
||||
$VALGRIND --tool=memcheck --leak-check=yes --log-fd=6 -q "$@" | grep -v + > log ||
|
||||
exitcode=$?
|
||||
cat valgrind.err 1>&2
|
||||
test -z "`sed 1q valgrind.err`" || exit 50
|
||||
rm -f valgrind.err
|
||||
else
|
||||
"$@" || exitcode=$?
|
||||
fi
|
||||
test $exitcode = $expected_exitcode || exit 1
|
||||
|
||||
exec 6>valgrind.err
|
||||
../../../libtool --mode=execute \
|
||||
$VALGRIND --tool=memcheck --leak-check=yes --log-fd=6 -q $1 log \
|
||||
| grep -v + > log2 ||
|
||||
exitcode=$?
|
||||
cat valgrind.err 1>&2
|
||||
test -z "`sed 1q valgrind.err`" || exit 50
|
||||
rm -f valgrind.err
|
||||
test $exitcode = $expected_exitcode || exit 1
|
||||
|
||||
diff log log2 || exit 42
|
||||
rm -f log log2
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
set -x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue