blob: 1209699481c0395d0a072fcf68eb9a01c8d7bf3b [file] [log] [blame]
Kailash92764922019-07-25 08:21:39 -07001#!/usr/bin/env bash
2
3# Copyright 2017-present Open Networking Foundation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# sets up a python virtualenv for running voltha system tests
18
19WORKSPACE=${WORKSPACE:-.}
20VENVDIR="${WORKSPACE}/venv-voltha-tests"
21
22# create venv if it's not yet there
23if [ ! -x "${VENVDIR}/bin/activate" ]; then
24 echo "Setting up dev/test virtualenv in ${VENVDIR} for VOLTHA-System-Tests"
25 virtualenv -q "${VENVDIR}" --no-site-packages
26 echo "Virtualenv created."
27fi
28
29echo "Installing python requirements in virtualenv with pip"
30source "${VENVDIR}/bin/activate"
31pip3 install --upgrade pip
32pip3 install cryptography==2.4.2 robotframework robotframework-requests robotframework-sshlibrary \
33 pexpect robotframework-httplibrary robotframework-kafkalibrary pygments pyyaml \
34 robotframework-databaselibrary psycopg2==2.7.7 paramiko==2.4.2
35pip3 install requests tinydb
36
37echo "VOLTHA-System-Tests virtualenv created. Run 'source ${VENVDIR}/bin/activate'."