mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
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.
This commit is contained in:
parent
cf8bb19a11
commit
21560c40e8
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue