X-Git-Url: http://www.project-moonshot.org/gitweb/?p=jansson.git;a=blobdiff_plain;f=test%2Fsuites%2Fapi%2Frun;h=48c3e7eb7d3e5d37b17f73d55d2a1a2d563a3343;hp=8688e0fb2d449da1c583f1d33864fa1d7e04b238;hb=5b1a666cf12e364713392fc9fa4d4162e83f514f;hpb=b495b9654715ca8ea2f18d7f92eff9da2ed57083 diff --git a/test/suites/api/run b/test/suites/api/run index 8688e0f..48c3e7e 100755 --- a/test/suites/api/run +++ b/test/suites/api/run @@ -6,16 +6,29 @@ # it under the terms of the MIT license. See LICENSE for details. is_test() { - [ "${test_name%.c}" != "$test_name" ] && return 0 - [ -x $test_path -a ! -f $test_path.c ] && return 0 - return 1 + case "$test_name" in + *.c|*.cpp|check-exports) + return 0 + ;; + *) + return 1 + ;; + esac } run_test() { - if [ -x $test_path ]; then + if [ "$test_name" = "check-exports" ]; then test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr else - $test_runner $suite_builddir/${test_name%.c} \ + case "$test_name" in + *.c) + test_bin=${test_name%.c} + ;; + *.cpp) + test_bin=${test_name%.cpp} + ;; + esac + $test_runner $suite_builddir/$test_bin \ >$test_log/stdout \ 2>$test_log/stderr \ || return 1