3 # Copyright 2019 © Samsung Electronics Co., Ltd.
4 # Modifications copyright (C) 2021 Nordix Foundation..
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # This script installs common libraries required by CSIT tests
21 if [ -z "$WORKSPACE" ]; then
22 export WORKSPACE=`git rev-parse --show-toplevel`
25 TESTPLANDIR=${WORKSPACE}/${TESTPLAN}
27 if [ -f ${WORKSPACE}/env.properties ]; then
28 source ${WORKSPACE}/env.properties
30 if [ -f ${ROBOT_VENV}/bin/activate ]; then
31 source ${ROBOT_VENV}/bin/activate
33 rm -f ${WORKSPACE}/env.properties
34 ROBOT_VENV=$(mktemp -d --suffix=robot_venv)
35 echo "ROBOT_VENV=${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
37 # The --system-site-packages parameter allows us to pick up system level
38 # installed packages. This allows us to bake matplotlib which takes very long
39 # to install into the image.
40 virtualenv --system-site-packages "${ROBOT_VENV}"
41 source "${ROBOT_VENV}/bin/activate"
45 # Make sure pip itself us up-to-date.
46 pip install --upgrade pip
47 # To avoid a json issue related to specific versions related to https://gerrit.onap.org/r/c/ci-management/+/120747
48 # in the ci-management repo, we are reverting to the orig versions.
49 pip install --upgrade --no-binary pycparser pycparser
50 pip install --upgrade pyOpenSSL==16.2.0 docker-py importlib requests scapy netifaces netaddr ipaddr simplejson demjson
51 pip install --upgrade robotframework{,-{httplibrary,requests,sshlibrary,selenium2library,xvfb}}
53 pip install xvfbwrapper
54 pip install PyVirtualDisplay
57 # Print installed versions.