glcpp-test: don't return failure if valgrind tests aren't run
authorMatt Turner <mattst88@gmail.com>
Sun, 29 Jan 2012 03:08:39 +0000 (22:08 -0500)
committerMatt Turner <mattst88@gmail.com>
Tue, 31 Jan 2012 02:09:57 +0000 (21:09 -0500)
Success was (tests-passed AND valgrind-tests-passed) but this meant that
if the valgrind tests weren't run it would be considered a failure.

The logic is now (tests-passed AND (!valgrind OR valgrind-tests-passed))
which lets us return success if the valgrind tests aren't run.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
src/glsl/glcpp/tests/glcpp-test

index e8f3b546387049a7bd2b028d680f6e794f76900b..1db752375673593a657672aa75fe3b917704e55d 100755 (executable)
@@ -72,7 +72,7 @@ if [ "$do_valgrind" = "yes" ]; then
     echo "$clean/$total tests are valgrind-clean"
 fi
 
-if [ "$pass" = "$total" ] && [ "$clean" = "$total" ]; then
+if [ "$pass" = "$total" ] && [ "$do_valgrind" != "yes" ] || [ "$pass" = "$total" ]; then
     exit 0
 else
     exit 1