Enable Valgrind support in the API suite
It was accidentally left out when the test system was refactored.
This commit is contained in:
parent
508873de9b
commit
b21f07b35c
@ -8,7 +8,10 @@
|
|||||||
VALGRIND_CMDLINE="valgrind --leak-check=full --show-reachable=yes --track-origins=yes -q"
|
VALGRIND_CMDLINE="valgrind --leak-check=full --show-reachable=yes --track-origins=yes -q"
|
||||||
|
|
||||||
if [ $VALGRIND -eq 1 ]; then
|
if [ $VALGRIND -eq 1 ]; then
|
||||||
|
test_runner="$VALGRIND_CMDLINE"
|
||||||
json_process="$VALGRIND_CMDLINE $json_process"
|
json_process="$VALGRIND_CMDLINE $json_process"
|
||||||
|
else
|
||||||
|
test_runner=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
valgrind_check() {
|
valgrind_check() {
|
||||||
|
@ -15,7 +15,10 @@ run_test() {
|
|||||||
if [ -x $test_path ]; then
|
if [ -x $test_path ]; then
|
||||||
test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr
|
test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr
|
||||||
else
|
else
|
||||||
$suite_builddir/${test_name%.c} >$test_log/stdout 2>$test_log/stderr
|
$test_runner $suite_builddir/${test_name%.c} \
|
||||||
|
>$test_log/stdout \
|
||||||
|
2>$test_log/stderr
|
||||||
|
valgrind_check $test_log/stderr || return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user