* src/ltltest/defs.in (run): New function, run valgrind.
* src/ltltest/equals.test, src/ltltest/lunabbrev.test, src/ltltest/nenoform.test, src/ltltest/parse.test, src/ltltest/parseerr.test, src/ltltest/tostring.test, src/ltltest/tunabbrev.test, src/ltltest/tunenoform.test: Use run(). * Makefile.am (EXTRA_DIST): Don't list the m4/*.m4 files, Automake 1.8 find them automatically. * configure.ac: Require Automake 1.8, in gnits mode, and check for valgrind. * THANKS: New empty file.
This commit is contained in:
parent
c2892a8275
commit
6f88e518a9
14 changed files with 167 additions and 160 deletions
|
|
@ -46,6 +46,26 @@ test -z "$VERBOSE" && exec >/dev/null 2>&1
|
|||
echo "== Running test $0"
|
||||
|
||||
DOT='@DOT@'
|
||||
VALGRIND='@VALGRIND@'
|
||||
|
||||
run()
|
||||
{
|
||||
expected_exitcode=$1
|
||||
shift
|
||||
exitcode=0
|
||||
if test -n "$VALGRIND"; then
|
||||
exec 6>valgrind.err
|
||||
# No --leak-check=yes for now, as it causes parserr.test to fail.
|
||||
GLIBCPP_FORCE_NEW=1 \
|
||||
$VALGRIND --logfile-fd=6 -q "$@" || 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
|
||||
}
|
||||
|
||||
# Turn on shell traces when VERBOSE=x.
|
||||
if test "x$VERBOSE" = xx; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue