[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: valgrind-tests.m4
From: |
Ben Pfaff |
Subject: |
Re: valgrind-tests.m4 |
Date: |
Mon, 17 May 2010 09:20:35 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
> I'm running self-tests under valgrind in several projects, and it seems
> like a general useful thing, so how about putting the macro for this in
> gnulib?
It looks like this implementation requires rerunning "configure"
to run tests under valgrind. If that's right, it seems
inconvenient. I've used different approaches in my own projects
so that this is not required:
* In GNU PSPP, which mostly uses the built-in Automake
test framework, the invocations of the test programs
are all through shell scripts. Each invocation of a
test program is preceded by $SUPERVISOR,
e.g. "$SUPERVISOR pspp ...". Then running "make check"
runs without valgrind; running "make check
SUPERVISOR='libtool --mode=execute valgrind'" runs with
valgrind; and so on. (Sometimes 'libtool
--mode=execute gdb --args' is handy.)
* In Open vSwitch, which uses Autotest, I added a
"check-valgrind" target that generates a collection of
wrapper scripts, one for each program to be tested, and
puts them at the head of $PATH, so that the test suite
automatically uses valgrind every time it invokes
valgrind.
--
Ben Pfaff
http://benpfaff.org