glsl/tests/optimisation-test: ensure that compare_ir is available
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 23 Feb 2017 14:17:09 +0000 (14:17 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 28 Mar 2017 14:31:23 +0000 (15:31 +0100)
Bail out early if the script is not where we expect it to be.

v2: use -f instead of -e. latter returns true on folder(s)

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 5ae5684..47970c6 100755 (executable)
@@ -36,6 +36,11 @@ for dir in tests/*/; do
     echo "$dir"
 done
 
+if [ ! -f "$compare_ir" ]; then
+    echo "Could not find compare_ir. Make sure that srcdir variable is correctly set."
+    exit 1
+fi
+
 echo "====== Testing optimization passes ======"
 for test in `find . -iname '*.opt_test'`; do
     echo -n "Testing $test..."