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:
Alexandre Duret-Lutz 2012-01-13 13:51:42 +01:00
parent 89279d9829
commit c21e716893
3 changed files with 28 additions and 52 deletions

View file

@ -1,3 +1,12 @@
2012-01-13 Alexandre Duret-Lutz <adl@lrde.epita.fr>
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().
2012-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2012-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Do use of tr1::unordered_map with G++ 4.0.0. Do use of tr1::unordered_map with G++ 4.0.0.

View file

@ -89,40 +89,4 @@ run()
test $exitcode = $expected_exitcode || exit 1 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 set -x

View file

@ -1,6 +1,5 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2011, 2012 Laboratoire de Recherche et Developpement
# Copyright (C) 2011 Laboratoire de Recherche et Developpement
# de l'Epita (LRDE) # de l'Epita (LRDE)
# #
# This file is part of Spot, a model checking library. # This file is part of Spot, a model checking library.
@ -20,52 +19,56 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA. # 02111-1307, USA.
. ./defs . ./defs
set -e set -e
run2()
{
run 0 ../parse_print "$1" > "$1.out"
run 0 ../parse_print "$1.out" > "$1.out2"
cmp "$1.out" "$1.out2"
}
cat >input <<\EOF cat >input1 <<EOF
state1, "!b", state2; state1, "!b", state2;
state2, "a&b", state3; state2, "a&b", state3;
state3, "a", state4 state1; state3, "a", state4 state1;
state4, "b", state1; state4, "b", state1;
EOF EOF
run2 0 ../parse_print input run2 input1
cat >input <<\EOF cat >input2 <<EOF
state1, , state1 state2; state1, , state1 state2;
state2, , state1 state2; state2, , state1 state2;
EOF EOF
run2 0 ../parse_print input run2 input2
cat >input <<\EOF cat >input3 <<EOF
state42, "!b & !a", state40; state42, "!b & !a", state40;
state40, "!a | b", state42; state40, "!a | b", state42;
EOF EOF
run2 0 ../parse_print input run2 input3
cat >input <<\EOF cat >input4 <<EOF
state1, "a&b", state1; state1, "a&b", state1;
EOF EOF
run2 0 ../parse_print input run2 input4
cat >input <<\EOF cat >input5 <<EOF
state51,,state60 state17 state3 state18 state62; state51,,state60 state17 state3 state18 state62;
EOF EOF
run2 0 ../parse_print input run2 input5
cat >input <<\EOF cat >input6 <<EOF
s42, "a&b|c&d", s51 s69 s73 s7; s42, "a&b|c&d", s51 s69 s73 s7;
s7, "a&a&a&!a", s42 s51 s69 s73 s42; s7, "a&a&a&!a", s42 s51 s69 s73 s42;
EOF EOF
run2 0 ../parse_print input run2 input6