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 <emil.velikov@collabora.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Emil Velikov 2017-02-23 13:15:42 +00:00 committed by Emil Velikov
parent bd4be79fc5
commit 05bc5b35a7

View file

@ -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