#!/bin/sh

fail_count=0
all_count=0

for test_suite in src/test/pegtl/pegtl-test-*
do
    if "./$test_suite"
    then
        echo "PASS: $test_suite"
    else
        echo "FAIL: $test_suite"
        fail_count=$((fail_count + 1))
    fi
    all_count=$((all_count + 1))
done

if [ $fail_count -eq 0 ]
then
    echo "PASS: All $all_count tests passed"
else
    echo "FAIL: $fail_count of $all_count tests failed"
fi
