From a88f7536817caf7a6b8fdee8b07dd7b8a2df792c Mon Sep 17 00:00:00 2001 From: harishmunjulur Date: Wed, 12 Feb 2020 12:25:45 -0800 Subject: [PATCH] qa:Using python3 -m nose for "nosetests:command not found" error On bionic "nosetests3" and on el "nosetests-3/nosetests-3.6" use neither. Rhel 7.7 does not support python3 using nosetests. Signed-off-by: harishmunjulur --- qa/workunits/rbd/test_librbd_python.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qa/workunits/rbd/test_librbd_python.sh b/qa/workunits/rbd/test_librbd_python.sh index f7424f63f8c8e..32f59683ba41e 100755 --- a/qa/workunits/rbd/test_librbd_python.sh +++ b/qa/workunits/rbd/test_librbd_python.sh @@ -2,11 +2,19 @@ relpath=$(dirname $0)/../../../src/test/pybind +source /etc/os-release + +pycmd=$"python3 -m nose" + +if [ "$VERSION_ID" == "7.7" ]; then + pycmd=$"nosetests" +fi + if [ -n "${VALGRIND}" ]; then valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \ --errors-for-leak-kinds=definite --error-exitcode=1 \ - python3 -m nose -v $relpath/test_rbd.py + $pycmd -v $relpath/test_rbd.py else - python3 -m nose -v $relpath/test_rbd.py + $pycmd -v $relpath/test_rbd.py fi exit 0 -- 2.39.5