From: Emil Velikov <emil.veli...@collabora.com>

Otherwise we'll fail when invoking the script outside of "make check"

Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
 src/compiler/glsl/tests/optimization-test | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/compiler/glsl/tests/optimization-test 
b/src/compiler/glsl/tests/optimization-test
index 26a51be698..7ccbb4467d 100755
--- a/src/compiler/glsl/tests/optimization-test
+++ b/src/compiler/glsl/tests/optimization-test
@@ -6,6 +6,16 @@ else
    compare_ir=./compare_ir
 fi
 
+if [ -z "$PYTHON2" ]; then
+    PYTHON2=python2
+fi
+
+which $PYTHON2 >/dev/null
+if [ "x$?" != x0 ]; then
+    echo "Could not find python2. Make sure that PYTHON2 variable is correctly 
set."
+    exit 1
+fi
+
 total=0
 pass=0
 
-- 
2.11.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to