projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41d525f
)
glcpp: Make test suite report final count of passed/total tests.
author
Carl Worth
<cworth@cworth.org>
Tue, 20 Jul 2010 00:48:17 +0000
(17:48 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 21 Jul 2010 00:01:11 +0000
(17:01 -0700)
And report PASS or FAIL for each test along the way as well.
src/glsl/glcpp/tests/glcpp-test
patch
|
blob
|
history
diff --git
a/src/glsl/glcpp/tests/glcpp-test
b/src/glsl/glcpp/tests/glcpp-test
index 396f6e175e8eaa31d39711b6d20ea360a11480c2..82777197150d5f4ff521b1f4acbf3906207d59d7 100755
(executable)
--- a/
src/glsl/glcpp/tests/glcpp-test
+++ b/
src/glsl/glcpp/tests/glcpp-test
@@
-1,7
+1,27
@@
#!/bin/sh
#!/bin/sh
+total=0
+pass=0
+
for test in *.c; do
for test in *.c; do
- echo
"Testing $test
"
+ echo
-n "Testing $test...
"
../glcpp < $test > $test.out
../glcpp < $test > $test.out
- diff -u $test.expected $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
done
+
+echo "$pass/$total tests returned correct results"
+echo ""
+
+if [ "$pass" = "$total" ] ; then
+ exit 0
+else
+ exit 1
+fi
+