aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2010-08-23 10:41:30 -0700
committerCarl Worth <[email protected]>2010-08-23 10:48:10 -0700
commit21560c40e8aa98624a225752b98babc7ae2938d5 (patch)
treed51c1e7d67cf977c40cd5bdfa5b1bbc22bad3ba7 /src/glsl/glcpp/tests
parentcf8bb19a114d753bca94f920b87dcf51aa26af99 (diff)
glcpp: Fix test suite to avoid flagging failed tests as valgrind errors.
We recently added several tests that intentionally trigger preprocessor errors. During valgrind-based testing, our test script was noticing the non-zero return value from the preprocessor and incorrectly flagging the valgrind-based test as failing. To fix this, we make valgrind return an error code that is otherwise unused by the preprocessor.
Diffstat (limited to 'src/glsl/glcpp/tests')
-rwxr-xr-xsrc/glsl/glcpp/tests/glcpp-test9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glsl/glcpp/tests/glcpp-test b/src/glsl/glcpp/tests/glcpp-test
index 6494d0c0e77..5dc08ea6acb 100755
--- a/src/glsl/glcpp/tests/glcpp-test
+++ b/src/glsl/glcpp/tests/glcpp-test
@@ -27,13 +27,14 @@ echo ""
echo "====== Testing for valgrind cleanliness ======"
for test in *.c; do
echo -n "Testing $test with valgrind..."
- if valgrind --error-exitcode=1 --log-file=$test.valgrind-errors ../glcpp < $test >/dev/null; then
+ valgrind --error-exitcode=31 --log-file=$test.valgrind-errors ../glcpp < $test >/dev/null 2>&1
+ if [ "$?" = "31" ]; then
+ echo "ERRORS"
+ cat $test.valgrind-errors
+ else
echo "CLEAN"
clean=$((clean+1))
rm $test.valgrind-errors
- else
- echo "ERRORS"
- cat $test.valgrind-errors
fi
done