#!/bin/sh

# run-ptest script for libcheck
# Runs the libcheck test suite and outputs results in ptest format

cd tests || exit 1

for test in check_check_export check_check \
            test_output.sh test_check_nofork.sh test_check_nofork_teardown.sh \
            test_xml_output.sh test_log_output.sh test_set_max_msg_size.sh \
            test_tap_output.sh; do
    if [ -x ./$test ]; then
        ./$test > /dev/null 2>&1
        if [ $? -eq 0 ]; then
            echo "PASS: $test"
        else
            echo "FAIL: $test"
        fi
    else
        echo "SKIP: $test"
    fi
done

exit 0
