X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=setup.sh;h=2e18a768184e12cc56645c725858f094d17639a3;hb=4dcb36ec53fea68e012bdb4bad8373b0001b38a4;hp=16a3e163eeab503d96f95f93909107c24b2eb556;hpb=71b7b0f6c0d54e72ca1f59e8d2f90405d5cba244;p=testsuite.git diff --git a/setup.sh b/setup.sh old mode 100644 new mode 100755 index 16a3e163..2e18a768 --- a/setup.sh +++ b/setup.sh @@ -13,86 +13,103 @@ exec 2> >(tee -a ${LOG_FILE} >&2) # get the path path=$(pwd) +pip install \ +--no-cache-dir \ +--exists-action s \ +--target="$path/robot/library" \ +'robotframework-seleniumlibrary==3.3.1' \ +'robotframework-databaselibrary==1.2' \ +'robotframework-angularjs==0.0.9' \ +'robotframework-requests==0.5.0' \ +'robotframework-sshlibrary==3.3.0' \ +'robotframework-ftplibrary==1.6' \ +'robotframework-archivelibrary==0.4.0' \ +'robotframework-jsonlibrary==0.3.1' + +pip install \ +--pre \ +--no-cache-dir \ +--exists-action s \ +--force-reinstall \ +--upgrade \ +--target="$path/robot/library" \ +git+https://git.onap.org/testsuite/python-testing-utils.git@master#egg=robotframework-onap\&subdirectory=robotframework-onap + + +# i dont why we need this, but lets protobuf work in docker +touch /var/opt/ONAP/robot/library/google/__init__.py + +############################### +# remove heatbridge +# commented out for testing +################################################################ +#if [ -d $path/testsuite/heatbridge ] +#then +# # Support LF build location +# cd $path/testsuite/heatbridge +#else +# cd ~ +# git config --global http.sslVerify false +# if [ -d ~/heatbridge ] +# then +# cd heatbridge +# git pull origin master +# else +# git clone https://gerrit.onap.org/r/testsuite/heatbridge.git +# cd heatbridge +# fi +#fi + +#pip install \ +#--no-cache-dir \ +#--upgrade \ +#--exists-action s \ +#--target="$path/robot/library" \ +#./heatbridge + +#sed -i 's/cinderclient\.v1\.client/cinderclient\.v2\.client/g' /var/opt/ONAP/robot/library/heatbridge/OpenstackManager.py + +################################################################ -pip install --no-cache-dir --target="$path/robot/library" 'selenium<=3.0.0' 'requests==2.11.1' 'robotframework-selenium2library==1.8.0' \ -'robotframework-databaselibrary==0.8.1' 'robotframework-extendedselenium2library==0.9.1' 'robotframework-requests==0.4.5' \ -'robotframework-sshlibrary==2.1.2' \ -'robotframework-sudslibrary==0.8' 'robotframework-ftplibrary==1.3' 'robotframework-rammbock==0.4.0.1' \ -'deepdiff==2.5.1' 'dnspython==1.15.0' 'robotframework-httplibrary==0.4.2' 'robotframework-archivelibrary==0.3.2' 'PyYAML==3.12' - +# Go back to execution folder +cd $path -# get the git for the eteutils you will need to add a private key to your ssh before this -if [ -d $path/testsuite/eteutils ] +# if the script is running during the image build skip the rest of it +# as required software is installed already. +if $BUILDTIME then - # Support LF build location - cd $path/testsuite/eteutils -else - cd ~ - git config --global http.sslVerify false - if [ -d ~/python-testing-utils ] - then - cd python-testing-utils - git pull origin master - else - git clone https://gerrit.onap.org/r/testsuite/python-testing-utils.git - cd python-testing-utils - fi -fi -pip install --no-cache-dir --upgrade --target="$path/robot/library" . - + # we need to update PATH with chromium-chromedriver + echo "Adding in-container chromedriver to PATH" + ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver -if [ -d $path/testsuite/heatbridge ] -then - # Support LF build location - cd $path/testsuite/heatbridge + echo "Skipping desktop steps, building container image..." else - cd ~ - git config --global http.sslVerify false - if [ -d ~/heatbridge ] + # + # Get the appropriate chromedriver. Default to linux64 + # + CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/75.0.3770.140 + CHROMEDRIVER_ZIP=chromedriver_linux64.zip + CHROMEDRIVER_TARGET=chromedriver.zip + + # Handle mac and windows + OS=`uname -s` + case $OS in + MINGW*_NT*) + CHROMEDRIVER_ZIP=chromedriver_win32.zip + ;; + Darwin*) + CHROMEDRIVER_ZIP=chromedriver_mac64.zip + ;; + *) echo "Defaulting to Linux 64" ;; + esac + + if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ] then - cd heatbridge - git pull origin master + curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET + unzip chromedriver.zip -d /usr/local/bin else - git clone https://gerrit.onap.org/r/testsuite/heatbridge.git - cd heatbridge + curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET + unzip $CHROMEDRIVER_TARGET fi -fi -pip install --no-cache-dir --upgrade --target="$path/robot/library" ./heatbridge - - -# NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2 -# This should be removed on new release of paramiko (2.1.2) or sshlibrary -# https://github.com/robotframework/SSHLibrary/issues/157 -pip install --no-cache-dir --target="$path/robot/library" -U 'paramiko==2.0.2' - - -# Go back to execution folder -cd $path - - -# -# Get the appropriate chromedriver. Default to linux64 -# -CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.29 -CHROMEDRIVER_ZIP=chromedriver_linux64.zip - -# Handle mac and windows -OS=`uname -s` -case $OS in - MINGW*_NT*) - CHROMEDRIVER_ZIP=chromedriver_win32.zip - ;; - Darwin*) - CHROMEDRIVER_ZIP=chromedriver_mac64.zip - ;; - *) echo "Defaulting to Linux 64" ;; -esac - -if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ] -then - wget -O chromedriver.zip $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP - unzip chromedriver.zip -d /usr/local/bin -else - curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o chromedriver.zip - unzip chromedriver.zip + rm -rf $CHROMEDRIVER_TARGET fi