chore: switch to python2 to use yum in tests
This commit is contained in:
parent
3013b982cc
commit
4f0cf167ec
|
@ -148,11 +148,14 @@ emqx_test(){
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"rpm")
|
"rpm")
|
||||||
|
# yum wants python2
|
||||||
|
alternatives --list | grep python && alternatives --set python /usr/bin/python2
|
||||||
YUM_RES=$(yum install -y "${PACKAGE_PATH}/${packagename}"| tee /dev/null)
|
YUM_RES=$(yum install -y "${PACKAGE_PATH}/${packagename}"| tee /dev/null)
|
||||||
if [[ $YUM_RES =~ "Failed" ]]; then
|
if [[ $YUM_RES =~ "Failed" ]]; then
|
||||||
echo "yum install failed"
|
echo "yum install failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
alternatives --list | grep python && alternatives --set python /usr/bin/python3
|
||||||
if ! rpm -q "${EMQX_NAME}" | grep -q "${EMQX_NAME}"; then
|
if ! rpm -q "${EMQX_NAME}" | grep -q "${EMQX_NAME}"; then
|
||||||
echo "package install error"
|
echo "package install error"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue