glsl/tests/warnings-test: error if zero tests were executed
authorEmil Velikov <emil.velikov@collabora.com>
Sun, 26 Feb 2017 21:33:08 +0000 (21:33 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 28 Mar 2017 14:31:22 +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/warnings-test.sh

index 9bb6ed7b6ccfa2fa6f025dc0782dcb1dece97492..14ab08c30de7ab6fb1da5745a0bc97c95a24b3de 100755 (executable)
@@ -42,6 +42,11 @@ for test in $srcdir/$tests_relative_dir/*.vert; 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 ""