3 ################################################################################
4 # Copyright (c) 2019 AT&T Intellectual Property. #
5 # Copyright (c) 2019 Nokia. #
7 # Licensed under the Apache License, Version 2.0 (the "License"); #
8 # you may not use this file except in compliance with the License. #
9 # You may obtain a copy of the License at #
11 # http://www.apache.org/licenses/LICENSE-2.0 #
13 # Unless required by applicable law or agreed to in writing, software #
14 # distributed under the License is distributed on an "AS IS" BASIS, #
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
16 # See the License for the specific language governing permissions and #
17 # limitations under the License. #
18 ################################################################################
23 # setup : script to setup required runtime environment. This script can be run again to update anything
24 # this should stay in your project directory
27 # save console output in setup_<timestamp>.log file in project directory
28 timestamp=$(date +"%m%d%Y_%H%M%S")
29 LOG_FILE=setup_$timestamp.log
30 exec > >(tee -a ${LOG_FILE} )
31 exec 2> >(tee -a ${LOG_FILE} >&2)
39 --target="$path/robot/library" \
42 'robotframework-selenium2library==1.8.0' \
43 'robotframework-databaselibrary==0.8.1' \
44 'robotframework-extendedselenium2library==0.9.1' \
45 'robotframework-requests==0.5.0' \
46 'robotframework-sshlibrary==2.1.2' \
47 'robotframework-sudslibrary==0.8' \
48 'robotframework-ftplibrary==1.3' \
49 'robotframework-rammbock==0.4.0.1' \
52 'robotframework-httplibrary==0.4.2' \
53 'robotframework-archivelibrary==0.3.2' \
57 'robotframework-kafkalibrary==0.0.2'
60 # for some reason the parent __init__.py isn't getting installed
61 # with google-auth. This is a quick fix until I figure out which
62 # package (hint: it's not "google") owns it.
63 touch $path/robot/library/google/__init__.py
65 # get the git for the eteutils you will need to add a private key to your ssh before this
66 if [ -d $path/testsuite/eteutils ]
68 # Support LF build location
69 cd $path/testsuite/eteutils
72 git config --global http.sslVerify false
73 if [ -d ~/python-testing-utils ]
75 cd python-testing-utils
76 git pull origin master
78 git clone -b 3.0.1-ONAP https://gerrit.onap.org/r/testsuite/python-testing-utils.git
79 cd python-testing-utils
83 # install python-testing-utils from current directory (.)
88 --target="$path/robot/library" .
91 # install the ric project python scripts
92 # from /var/opt/RIC/ric-python-utils
93 # to /var/opt/RIC/robot/library/ricutils
94 if [ -d $path/ric-python-utils ]
96 # Support LF build location
97 cd $path/ric-python-utils
98 # install ric-python-utils from current directory (.)
103 --target="$path/robot/library" .
106 # NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2
107 # This should be removed on new release of paramiko (2.1.2) or sshlibrary
108 # https://github.com/robotframework/SSHLibrary/issues/157
111 --target="$path/robot/library" \
115 # Go back to execution folder
118 # if the script is running during the image build skip the rest of it
119 # as required software is installed already.
122 # we need to update PATH with APT-GET installed chromium-chromedriver
123 echo "Adding in-container chromedriver to PATH"
124 ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
127 # Get the appropriate chromedriver. Default to linux64
129 CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.43
130 CHROMEDRIVER_ZIP=chromedriver_linux64.zip
131 CHROMEDRIVER_TARGET=chromedriver.zip
133 # Handle mac and windows
137 CHROMEDRIVER_ZIP=chromedriver_win32.zip
140 CHROMEDRIVER_ZIP=chromedriver_mac64.zip
142 *) echo "Defaulting to Linux 64" ;;
145 if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ]
147 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
148 unzip chromedriver.zip -d /usr/local/bin
150 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
151 unzip $CHROMEDRIVER_TARGET
153 rm -rf $CHROMEDRIVER_TARGET
157 # Install kafkacat : https://github.com/edenhill/kafkacat
162 brew install kafkacat ;;
164 apt-get -y install kafkacat
172 brew install protobuf ;;
174 apt-get -y install protobuf-compiler