From b21f07b35c7cbf80a2275fde97b65b270119d9a1 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Sun, 10 Jan 2010 16:18:45 +0200 Subject: [PATCH] Enable Valgrind support in the API suite It was accidentally left out when the test system was refactored. --- test/scripts/valgrind.sh | 3 +++ test/suites/api/run | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/scripts/valgrind.sh b/test/scripts/valgrind.sh index 7c23c79..39cda0d 100644 --- a/test/scripts/valgrind.sh +++ b/test/scripts/valgrind.sh @@ -8,7 +8,10 @@ VALGRIND_CMDLINE="valgrind --leak-check=full --show-reachable=yes --track-origins=yes -q" if [ $VALGRIND -eq 1 ]; then + test_runner="$VALGRIND_CMDLINE" json_process="$VALGRIND_CMDLINE $json_process" +else + test_runner="" fi valgrind_check() { diff --git a/test/suites/api/run b/test/suites/api/run index fbee1da..02e92b0 100755 --- a/test/suites/api/run +++ b/test/suites/api/run @@ -15,7 +15,10 @@ run_test() { if [ -x $test_path ]; then test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr 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 } -- 2.1.4