scripts: Update klippy build tests to verify on both Python2 and Python3

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-10-01 19:33:15 -04:00
parent f1747b5118
commit b743a64685
2 changed files with 20 additions and 5 deletions

View File

@ -9,6 +9,7 @@ MAIN_DIR=${PWD}
BUILD_DIR=${PWD}/ci_build
export PATH=${BUILD_DIR}/pru-gcc/bin:${PATH}
PYTHON=${BUILD_DIR}/python-env/bin/python
PYTHON2=${BUILD_DIR}/python2-env/bin/python
######################################################################
@ -63,6 +64,10 @@ done
# Verify klippy host software
######################################################################
start_test klippy "Test invoke klippy"
start_test klippy "Test invoke klippy (Python3)"
$PYTHON scripts/test_klippy.py -d ${DICTDIR} test/klippy/*.test
finish_test klippy "Test invoke klippy"
finish_test klippy "Test invoke klippy (Python3)"
start_test klippy "Test invoke klippy (Python2)"
$PYTHON2 scripts/test_klippy.py -d ${DICTDIR} test/klippy/*.test
finish_test klippy "Test invoke klippy (Python2)"

View File

@ -49,10 +49,20 @@ fi
######################################################################
# Create python virtualenv environment
# Create python3 virtualenv environment
######################################################################
echo -e "\n\n=============== Install python virtualenv\n\n"
echo -e "\n\n=============== Install python3 virtualenv\n\n"
cd ${MAIN_DIR}
virtualenv -p python2 ${BUILD_DIR}/python-env
virtualenv -p python3 ${BUILD_DIR}/python-env
${BUILD_DIR}/python-env/bin/pip install -r ${MAIN_DIR}/scripts/klippy-requirements.txt
######################################################################
# Create python2 virtualenv environment
######################################################################
echo -e "\n\n=============== Install python2 virtualenv\n\n"
cd ${MAIN_DIR}
virtualenv -p python2 ${BUILD_DIR}/python2-env
${BUILD_DIR}/python2-env/bin/pip install -r ${MAIN_DIR}/scripts/klippy-requirements.txt