mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
test: Make the --valgrind option useful, (and drop --verbose).
In order for --valgrind to be useful, we drop noisy additional output of all of the commands being executed in verbose mode. This makes --verbose alone quite useless, so we don't document it any more. Also, add a zlib valgrind suppression that was showing up frequently in the test suite.
This commit is contained in:
parent
029a105da3
commit
169639e606
5 changed files with 7 additions and 15 deletions
|
@ -17,11 +17,6 @@ one of the executable scripts in this directory, (such as ./search,
|
||||||
|
|
||||||
The following command-line options are available when running tests:
|
The following command-line options are available when running tests:
|
||||||
|
|
||||||
--verbose::
|
|
||||||
This makes the test more verbose. Specifically, the
|
|
||||||
command being run and their output if any are also
|
|
||||||
output.
|
|
||||||
|
|
||||||
--debug::
|
--debug::
|
||||||
This may help the person who is developing a new test.
|
This may help the person who is developing a new test.
|
||||||
It causes the command defined with test_debug to run.
|
It causes the command defined with test_debug to run.
|
||||||
|
|
|
@ -385,7 +385,6 @@ test_expect_equal ()
|
||||||
expected="$2"
|
expected="$2"
|
||||||
if ! test_skip "$@"
|
if ! test_skip "$@"
|
||||||
then
|
then
|
||||||
say >&3 "expecting success: diff $output $expected"
|
|
||||||
if [ "$output" = "$expected" ]; then
|
if [ "$output" = "$expected" ]; then
|
||||||
test_ok_ "$test_subtest_name"
|
test_ok_ "$test_subtest_name"
|
||||||
else
|
else
|
||||||
|
@ -394,7 +393,6 @@ test_expect_equal ()
|
||||||
echo "$output" > $testname.output
|
echo "$output" > $testname.output
|
||||||
test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)"
|
test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)"
|
||||||
fi
|
fi
|
||||||
echo >&3 ""
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,7 +520,6 @@ test_expect_failure () {
|
||||||
error "bug in the test script: not 2 or 3 parameters to test-expect-failure"
|
error "bug in the test script: not 2 or 3 parameters to test-expect-failure"
|
||||||
if ! test_skip "$@"
|
if ! test_skip "$@"
|
||||||
then
|
then
|
||||||
say >&3 "checking known breakage: $2"
|
|
||||||
test_run_ "$2"
|
test_run_ "$2"
|
||||||
if [ "$?" = 0 -a "$eval_ret" = 0 ]
|
if [ "$?" = 0 -a "$eval_ret" = 0 ]
|
||||||
then
|
then
|
||||||
|
@ -531,7 +528,6 @@ test_expect_failure () {
|
||||||
test_known_broken_failure_ "$1"
|
test_known_broken_failure_ "$1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo >&3 ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_expect_success () {
|
test_expect_success () {
|
||||||
|
@ -540,7 +536,6 @@ test_expect_success () {
|
||||||
error "bug in the test script: not 2 or 3 parameters to test-expect-success"
|
error "bug in the test script: not 2 or 3 parameters to test-expect-success"
|
||||||
if ! test_skip "$@"
|
if ! test_skip "$@"
|
||||||
then
|
then
|
||||||
say >&3 "expecting success: $2"
|
|
||||||
test_run_ "$2"
|
test_run_ "$2"
|
||||||
if [ "$?" = 0 -a "$eval_ret" = 0 ]
|
if [ "$?" = 0 -a "$eval_ret" = 0 ]
|
||||||
then
|
then
|
||||||
|
@ -549,7 +544,6 @@ test_expect_success () {
|
||||||
test_failure_ "$@"
|
test_failure_ "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo >&3 ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_expect_code () {
|
test_expect_code () {
|
||||||
|
@ -558,7 +552,6 @@ test_expect_code () {
|
||||||
error "bug in the test script: not 3 or 4 parameters to test-expect-code"
|
error "bug in the test script: not 3 or 4 parameters to test-expect-code"
|
||||||
if ! test_skip "$@"
|
if ! test_skip "$@"
|
||||||
then
|
then
|
||||||
say >&3 "expecting exit code $1: $3"
|
|
||||||
test_run_ "$3"
|
test_run_ "$3"
|
||||||
if [ "$?" = 0 -a "$eval_ret" = "$1" ]
|
if [ "$?" = 0 -a "$eval_ret" = "$1" ]
|
||||||
then
|
then
|
||||||
|
@ -567,7 +560,6 @@ test_expect_code () {
|
||||||
test_failure_ "$@"
|
test_failure_ "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo >&3 ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# test_external runs external test scripts that provide continuous
|
# test_external runs external test scripts that provide continuous
|
||||||
|
@ -613,7 +605,6 @@ test_external_without_stderr () {
|
||||||
[ -f "$stderr" ] || error "Internal error: $stderr disappeared."
|
[ -f "$stderr" ] || error "Internal error: $stderr disappeared."
|
||||||
descr="no stderr: $1"
|
descr="no stderr: $1"
|
||||||
shift
|
shift
|
||||||
say >&3 "expecting no stderr from previous command"
|
|
||||||
if [ ! -s "$stderr" ]; then
|
if [ ! -s "$stderr" ]; then
|
||||||
rm "$stderr"
|
rm "$stderr"
|
||||||
test_ok_ "$descr"
|
test_ok_ "$descr"
|
||||||
|
|
6
test/valgrind/suppressions
Normal file
6
test/valgrind/suppressions
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
zlib inflation uses uninitialize values
|
||||||
|
Memcheck:Cond
|
||||||
|
fun:inflateReset2
|
||||||
|
fun:inflateInit2_
|
||||||
|
}
|
|
@ -13,7 +13,7 @@ TRACK_ORIGINS=--track-origins=yes
|
||||||
|
|
||||||
exec valgrind -q --error-exitcode=126 \
|
exec valgrind -q --error-exitcode=126 \
|
||||||
--leak-check=no \
|
--leak-check=no \
|
||||||
--suppressions="$GIT_VALGRIND/default.supp" \
|
--suppressions="$GIT_VALGRIND/suppressions" \
|
||||||
--gen-suppressions=all \
|
--gen-suppressions=all \
|
||||||
$TRACK_ORIGINS \
|
$TRACK_ORIGINS \
|
||||||
--log-fd=4 \
|
--log-fd=4 \
|
||||||
|
|
Loading…
Reference in a new issue