X-Git-Url: http://www.project-moonshot.org/gitweb/?p=jansson.git;a=blobdiff_plain;f=test%2Fscripts%2Frun-tests.sh;fp=test%2Fscripts%2Frun-tests.sh;h=adf34d457cfd1b9118321e25a3cadacbb0b26c6b;hp=48dfae843639655fd8191b3cfa4c8817d8de1fdc;hb=38e35e0973afaeee3ab79ce3a18432af8e6f0260;hpb=c30e92603c0780040fa3a974d6234dedeb5cd266 diff --git a/test/scripts/run-tests.sh b/test/scripts/run-tests.sh index 48dfae8..adf34d4 100644 --- a/test/scripts/run-tests.sh +++ b/test/scripts/run-tests.sh @@ -30,31 +30,46 @@ for test_path in $suite_srcdir/*; do rm -rf $test_log mkdir -p $test_log if [ $VERBOSE -eq 1 ]; then - echo -n "$test_name... " + printf '%s... ' "$test_name" fi - if run_test; then - # Success - if [ $VERBOSE -eq 1 ]; then - echo "ok" - else - echo -n "." - fi - rm -rf $test_log - else - # Failure - if [ $VERBOSE -eq 1 ]; then - echo "FAILED" - else - echo -n "F" - fi + run_test + case $? in + 0) + # Success + if [ $VERBOSE -eq 1 ]; then + printf 'ok\n' + else + printf '.' + fi + rm -rf $test_log + ;; - [ $STOP -eq 1 ] && break - fi + 77) + # Skip + if [ $VERBOSE -eq 1 ]; then + printf 'skipped\n' + else + printf 'S' + fi + rm -rf $test_log + ;; + + *) + # Failure + if [ $VERBOSE -eq 1 ]; then + printf 'FAILED\n' + else + printf 'F' + fi + + [ $STOP -eq 1 ] && break + ;; + esac done if [ $VERBOSE -eq 0 ]; then - echo + printf '\n' fi if [ -n "$(ls -A $suite_log)" ]; then