summaryrefslogtreecommitdiff
path: root/src/glsl/glcpp/tests/glcpp-test
blob: 82777197150d5f4ff521b1f4acbf3906207d59d7 (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
#!/bin/sh

total=0
pass=0

for test in *.c; do
    echo -n "Testing $test..."
    ../glcpp < $test > $test.out
    total=$((total+1))
    if cmp $test.expected $test.out; then
	echo "PASS"
	pass=$((pass+1))
    else
	echo "FAIL"
	diff -u $test.expected $test.out
    fi
done

echo "$pass/$total tests returned correct results"
echo ""

if [ "$pass" = "$total" ] ; then
    exit 0
else
    exit 1
fi