Initial checkin of EopenECOMP testsuite
[testsuite.git] / setup.sh
1 #!/bin/bash
2 #
3 # setup : script to setup required runtime environment. This script can be run again to update anything
4 # this should stay in your project directory
5 #
6
7 # get the path
8 path=$(pwd)
9
10 pip install --target="$path/robot/library" 'selenium<=3.0.0' 'requests==2.11.1' 'robotframework-selenium2library==1.8.0' \
11 'robotframework-databaselibrary==0.8.1' 'robotframework-extendedselenium2library==0.9.1' 'robotframework-requests==0.4.5' \
12 'robotframework-sshlibrary==2.1.2' \
13 'robotframework-sudslibrary==0.8' 'robotframework-ftplibrary==1.3' 'robotframework-rammbock==0.4.0.1' \
14 'deepdiff==2.5.1' 'dnspython==1.15.0' 'robotframework-httplibrary==0.4.2' 'robotframework-archivelibrary==0.3.2' 'PyYAML==3.12'
15
16
17 # get the git for the eteutils you will need to add a private key to your ssh before this
18 if [ -d $path/eteutils ]
19 then
20         cd $path/eteutils
21 else 
22         cd ~
23         git config --global http.sslVerify false
24         if [ -d ~/python-testing-utils ]
25         then
26                 cd python-testing-utils
27                 git pull origin master
28         else 
29                 git clone https://gerrit.openecomp.org/r/testsuite/python-testing-utils.git
30                 cd python-testing-utils
31         fi
32 fi
33 pip install --upgrade --target="$path/robot/library" .
34
35
36 if [ -d $path/heatbridge ]
37 then
38         cd $path/heatbridge
39 else 
40         cd ~
41         git config --global http.sslVerify false
42         if [ -d ~/heatbridge ]
43         then
44                 cd heatbridge
45                 git pull origin master
46         else 
47                 git clone https://gerrit.openecomp.org/r/testsuite/heatbridge.git
48                 cd heatbridge
49         fi
50 fi
51 pip install --upgrade --target="$path/robot/library" .
52
53
54 # NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2
55 # This should be removed on new release of paramiko (2.1.2) or sshlibrary
56 # https://github.com/robotframework/SSHLibrary/issues/157
57 pip install --target="$path/robot/library" -U 'paramiko==2.0.2'
58
59 #
60 # Get the appropriate chromedriver. Default to linux64 
61 #
62 CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.27
63 CHROMEDRIVER_ZIP=chromedriver_linux64.zip
64
65 # Handle mac and windows 
66 OS=`uname -s`
67 case $OS in
68   MINGW*_NT*) 
69         CHROMEDRIVER_ZIP=chromedriver_win32.zip
70         ;;
71   Darwin*)
72         CHROMEDRIVER_ZIP=chromedriver_mac64.zip 
73         ;;
74   *) echo "Defaulting to Linux 64" ;;
75 esac
76
77 if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ]
78 then
79     wget -O chromedriver.zip $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP 
80         unzip chromedriver.zip -d /usr/local/bin
81 else
82     curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o chromedriver.zip  
83         unzip chromedriver.zip 
84 fi