DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 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 | |
jf9860 | e770718 | 2017-03-01 12:04:43 -0500 | [diff] [blame] | 10 | pip install --no-cache-dir --target="$path/robot/library" 'selenium<=3.0.0' 'requests==2.11.1' 'robotframework-selenium2library==1.8.0' \ |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 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 |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 18 | if [ -d $path/testsuite/eteutils ] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 19 | then |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 20 | # Support LF build location |
| 21 | cd $path/testsuite/eteutils |
| 22 | else |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 23 | cd ~ |
| 24 | git config --global http.sslVerify false |
| 25 | if [ -d ~/python-testing-utils ] |
| 26 | then |
| 27 | cd python-testing-utils |
| 28 | git pull origin master |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 29 | else |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 30 | git clone https://gerrit.openecomp.org/r/testsuite/python-testing-utils.git |
| 31 | cd python-testing-utils |
| 32 | fi |
| 33 | fi |
| 34 | pip install --upgrade --target="$path/robot/library" . |
| 35 | |
| 36 | |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 37 | if [ -d $path/testsuite/heatbridge ] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 38 | then |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 39 | # Support LF build location |
| 40 | cd $path/testsuite/heatbridge |
| 41 | else |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 42 | cd ~ |
| 43 | git config --global http.sslVerify false |
| 44 | if [ -d ~/heatbridge ] |
| 45 | then |
| 46 | cd heatbridge |
| 47 | git pull origin master |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 48 | else |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 49 | git clone https://gerrit.openecomp.org/r/testsuite/heatbridge.git |
| 50 | cd heatbridge |
| 51 | fi |
| 52 | fi |
| 53 | pip install --upgrade --target="$path/robot/library" . |
| 54 | |
| 55 | |
| 56 | # NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2 |
| 57 | # This should be removed on new release of paramiko (2.1.2) or sshlibrary |
| 58 | # https://github.com/robotframework/SSHLibrary/issues/157 |
| 59 | pip install --target="$path/robot/library" -U 'paramiko==2.0.2' |
| 60 | |
| 61 | # |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 62 | # Get the appropriate chromedriver. Default to linux64 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 63 | # |
| 64 | CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.27 |
| 65 | CHROMEDRIVER_ZIP=chromedriver_linux64.zip |
| 66 | |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 67 | # Handle mac and windows |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 68 | OS=`uname -s` |
| 69 | case $OS in |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 70 | MINGW*_NT*) |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 71 | CHROMEDRIVER_ZIP=chromedriver_win32.zip |
| 72 | ;; |
| 73 | Darwin*) |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 74 | CHROMEDRIVER_ZIP=chromedriver_mac64.zip |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 75 | ;; |
| 76 | *) echo "Defaulting to Linux 64" ;; |
| 77 | esac |
| 78 | |
| 79 | if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ] |
| 80 | then |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 81 | wget -O chromedriver.zip $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 82 | unzip chromedriver.zip -d /usr/local/bin |
| 83 | else |
jf9860 | 0d5b0bf | 2017-02-24 14:39:40 -0500 | [diff] [blame] | 84 | curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o chromedriver.zip |
| 85 | unzip chromedriver.zip |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 86 | fi |