From aee7846ab513c74932a32885f7f9d78b17e74a66 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Jul 27 2019 21:16:26 +0000 Subject: Fix Python test in CentOS8 --- diff --git a/tests/p_python/0-install-python.sh b/tests/p_python/0-install-python.sh index d102bb6..3ba2adc 100755 --- a/tests/p_python/0-install-python.sh +++ b/tests/p_python/0-install-python.sh @@ -4,4 +4,8 @@ # Install python t_Log "Running $0 - installing python." +if [ "$centos_ver" -ge 8 ] ; then +t_InstallPackage python36 +else t_InstallPackage python +fi diff --git a/tests/p_python/10-test_python.sh b/tests/p_python/10-test_python.sh index 52f27ef..57fec65 100755 --- a/tests/p_python/10-test_python.sh +++ b/tests/p_python/10-test_python.sh @@ -4,15 +4,21 @@ t_Log "Running $0 - python can print Hello World" +if [ "$centos_ver" -ge 8 ] ; then +PYTHON=python3 +else +PYTHON=python +fi + # creating source file FILE='/var/tmp/python-test.py' cat > $FILE </dev/null 2>&1 # Installing additional python/mysql module +if [ "$centos_ver" -ge 8 ] ; then +t_InstallPackage python3-PyMySQL +importcomponent="pymysql" +else t_InstallPackage MySQL-python +importcomponent="MySQLdb" +fi # create python Scrip SCRIPT='/var/tmp/test.py' cat >$SCRIPT <