glsl/tests/optimization-test: error if zero tests were executed
authorEmil Velikov <emil.velikov@collabora.com>
Sun, 26 Feb 2017 20:43:05 +0000 (20:43 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 28 Mar 2017 14:31:23 +0000 (15:31 +0100)
We don't want to lie ourselves that 'everything is fine' when no tests
were found/ran.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/compiler/glsl/tests/optimization-test.sh

index ddfa7886b5a065223d4097eec81552fae2e606ce..5069235868af946d6562219b5b3f55a4ee2f7ed1 100755 (executable)
@@ -72,6 +72,11 @@ for test in `find . -iname '*.opt_test'`; do
     fi
 done
 
+if [ $total -eq 0 ]; then
+    echo "Could not find any tests."
+    exit 1
+fi
+
 echo ""
 echo "$pass/$total tests returned correct results"
 echo ""