projects
/
jansson.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable Valgrind support in the API suite
[jansson.git]
/
test
/
suites
/
api
/
run
diff --git
a/test/suites/api/run
b/test/suites/api/run
index
29d628a
..
02e92b0
100755
(executable)
--- a/
test/suites/api/run
+++ b/
test/suites/api/run
@@
-6,11
+6,20
@@
# it under the terms of the MIT license. See LICENSE for details.
is_test() {
# it under the terms of the MIT license. See LICENSE for details.
is_test() {
- test "${test_name%.c}" != "$test_name"
+ [ "${test_name%.c}" != "$test_name" ] && return 0
+ [ -x $test_path -a ! -f $test_path.c ] && return 0
+ return 1
}
run_test() {
}
run_test() {
- $suite_builddir/${test_name%.c} >$test_log/stdout 2>$test_log/stderr
+ if [ -x $test_path ]; then
+ test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr
+ else
+ $test_runner $suite_builddir/${test_name%.c} \
+ >$test_log/stdout \
+ 2>$test_log/stderr
+ valgrind_check $test_log/stderr || return 1
+ fi
}
show_error() {
}
show_error() {