build/CI/packaging: use python2, if python is not available.

This is required to fix cram tests on RHEL 8.
This commit is contained in:
Alexey Kopytov
2019-10-20 22:33:46 +03:00
parent 92c8660873
commit ac430bd7cf

View File

@ -83,4 +83,15 @@ export LUA_PATH
. $SBTEST_CONFIG
cram --shell=/bin/bash --verbose $tests
if $(which python >/dev/null 2>&1)
then
PYTHON=python
elif $(which python2 >/dev/null 2&1)
then
PYTHON=python2
else
echo "Cannot find python interpreter in PATH"
exit 1
fi
$PYTHON cram --shell=/bin/bash --verbose $tests