From 05bc5b35a7b57ca5c8be476b5c0c6ca2e59ef0ba Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 23 Feb 2017 13:15:42 +0000 Subject: [PATCH] glsl/tests/optimisation-test: make sure that $PYTHON2 is set/available Otherwise we'll fail when invoking the script outside of "make check" v2: use -ne over a string comparison (Eric) Signed-off-by: Emil Velikov Acked-by: Kenneth Graunke Reviewed-by: Eric Engestrom --- src/compiler/glsl/tests/optimization-test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh index dc9740f..7410db6 100755 --- a/src/compiler/glsl/tests/optimization-test.sh +++ b/src/compiler/glsl/tests/optimization-test.sh @@ -6,6 +6,16 @@ else compare_ir=./compare_ir.py fi +if [ -z "$PYTHON2" ]; then + PYTHON2=python2 +fi + +which $PYTHON2 >/dev/null +if [ $? -ne 0 ]; then + echo "Could not find python2. Make sure that PYTHON2 variable is correctly set." + exit 1 +fi + total=0 pass=0 -- 2.7.4