aboutsummaryrefslogtreecommitdiff
path: root/install-on-debian.sh
blob: 55074208056e675916c7532519d01bd4d2cb4839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash

set -e
set -x
# pre-requirements
prerequirements () {
    sudo apt-get install -y python2.7
    sudo apt-get install -y python-pip
    sudo pip install robotframework
    sudo pip install robotframework-selenium2library
    exit 0
}

# For x86_64
install_chromedriver_x86_64 () {
    wget http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip
    unzip chromedriver_linux64.zip
    sudo cp chromedriver /usr/bin/
    sudo chmod 777 /usr/bin/chromedriver
    exit 0
}

install_chromedriver_x86 () {
    wget http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux32.zip
    unzip chromedriver_linux32.zip
    sudo cp chromedriver /usr/bin/
    sudo chmod 777 /usr/bin/chromedriver
    exit 0
}

# For aarch64
install_chromedriver_aarch64 () {
    google_chrome_softlink
    sudo apt-get -y install chromedriver
    cp /usr/lib/chromium/chromedriver /usr/bin/
    sudo chmod 777 /usr/bin/chromedriver
    exit 0
}

# In case of 96boards we pre install chromium on linaro builds
# Officially chromium not supported by robot framework.
# Hack, created a soft link as google-chrome from chromium.
# In the test case we have to mention browser name as chrome.
# But test case opens chromium browser
google_chrome_softlink () {
    cd /usr/bin/
    sudo ln -sf chromium google-chrome
    cd -
}

prerequirements
install_chromedriver_`uname -m`
if [ $? -ne 0 ]; then
    echo "Not supported Architecture `arch`"
    echo "install-on-debian.sh : failed"
    exit 1
fi