Migrate these CSIT scripts to explicitly use the latest Python 3.x
version available in pyenv, the same as the earlier jobs that setup
the robot framework environment. Also, output some useful versioning
information to aid debugging.
Issue-ID: CCSDK-3820
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Change-Id: I332f2c46018d4c3433f0a3df9a0f35bb90241b07
TESTPLANDIR=${WORKSPACE}/${TESTPLAN}
TESTPLANDIR=${WORKSPACE}/${TESTPLAN}
+# Version should match those used to setup robot-framework in other jobs/stages
+# Use pyenv for selecting the python version
+if [[ -d "/opt/pyenv" ]]; then
+ echo "Setup pyenv:"
+ export PYENV_ROOT="/opt/pyenv"
+ export PATH="$PYENV_ROOT/bin:$PATH"
+ pyenv versions
+ if command -v pyenv 1>/dev/null 2>&1; then
+ eval "$(pyenv init - --no-rehash)"
+ # Choose the latest numeric Python version from installed list
+ version=$(pyenv versions --bare | sed '/^[^0-9]/d' | sort -V | tail -n 1)
+ pyenv local "${version}"
+ fi
+fi
+
# Assume that if ROBOT3_VENV is set and virtualenv with system site packages can be activated,
# ci-management/jjb/integration/include-raw-integration-install-robotframework.sh has already
# been executed
# Assume that if ROBOT3_VENV is set and virtualenv with system site packages can be activated,
# ci-management/jjb/integration/include-raw-integration-install-robotframework.sh has already
# been executed
# install eteutils
mkdir -p ${ROBOT3_VENV}/src/onap
rm -rf ${ROBOT3_VENV}/src/onap/testsuite
# install eteutils
mkdir -p ${ROBOT3_VENV}/src/onap
rm -rf ${ROBOT3_VENV}/src/onap/testsuite
-python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
+python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==11.0.0.dev17' --pre
+echo "Versioning information:"
+python3 --version
+pip freeze
+python3 -m robot.run --version || :
\ No newline at end of file
# Branched from ccsdk/distribution to this repository Feb 23, 2021
# Branched from ccsdk/distribution to this repository Feb 23, 2021
+echo "---> run-csit.sh"
+
WORKDIR=$(mktemp -d --suffix=-robot-workdir)
WORKDIR=$(mktemp -d --suffix=-robot-workdir)
+# Version should match those used to setup robot-framework in other jobs/stages
+# Use pyenv for selecting the python version
+if [[ -d "/opt/pyenv" ]]; then
+ echo "Setup pyenv:"
+ export PYENV_ROOT="/opt/pyenv"
+ export PATH="$PYENV_ROOT/bin:$PATH"
+ pyenv versions
+ if command -v pyenv 1>/dev/null 2>&1; then
+ eval "$(pyenv init - --no-rehash)"
+ # Choose the latest numeric Python version from installed list
+ version=$(pyenv versions --bare | sed '/^[^0-9]/d' | sort -V | tail -n 1)
+ pyenv local "${version}"
+ fi
+fi
+
-echo "---> run-csit.sh"
-
# wrapper for sourcing a file
function source_safely() {
[ -z "$1" ] && return 1
# wrapper for sourcing a file
function source_safely() {
[ -z "$1" ] && return 1
echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ${SUITES} ..."
relax_set
echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ${SUITES} ..."
relax_set
+
+echo "Versioning information:"
+python3 --version
+pip freeze
+python3 -m robot.run --version || :
+
python3 -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
RESULT=$?
load_set
python3 -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
RESULT=$?
load_set