summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libunwind/libunwind/run-ptest
blob: 360c2cee8fa9c59b409ab4efd12d7df0ac91ebf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh

FAILED=0
ALL=0

for TEST in $(cat tests); do
    ./$TEST
    ret=$?

    case "$ret" in
        0)
            echo "PASS: $TEST"
            ALL=$((ALL + 1))
            ;;
        77)
            echo "SKIP: $TEST"
            ;;
        *)
            echo "FAIL: $TEST"
            FAILED=$((FAILED + 1))
            ALL=$((ALL + 1))
            ;;
    esac
done

if [ "$FAILED" -eq 0 ] ; then
    echo "All $ALL tests passed"
else
    echo "$FAILED of $ALL tests failed"
fi