@@ -14,6 +14,36 @@ update_dev_packages() {
14 pip install --upgrade -r "$BASE_DIR/requirements-dev.txt"
14 pip install --upgrade -r "$BASE_DIR/requirements-dev.txt"
18+ echo '[!] Checking geckodriver'
20+ geckodriver -V 2>1 > /dev/null || NOTFOUND=1
22+ if [ -z $NOTFOUND ]; then
25+ GECKODRIVER_VERSION="v0.11.1"
26+ PLATFORM=`python -c "import platform; print platform.system().lower(), platform.architecture()[0]"`
28+ "linux 32bit" | "linux2 32bit") ARCH="linux32";;
29+ "linux 64bit" | "linux2 64bit") ARCH="linux64";;
30+ "windows 32 bit") ARCH="win32";;
31+ "windows 64 bit") ARCH="win64";;
32+ "mac 64bit") ARCH="macos";;
34+ GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz";
35+ if [ -z "$VIRTUAL_ENV" ]; then
36+ echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n $GECKODRIVER_URL"
39+ echo "Installing $VIRTUAL_ENV from\n $GECKODRIVER_URL"
41+ wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C $VIRTUAL_ENV/bin/ -f $FILE geckodriver
43+ chmod 777 $VIRTUAL_ENV/bin/geckodriver
17pep8_check() {
47pep8_check() {
18 echo '[!] Running pep8 check'
48 echo '[!] Running pep8 check'
19 # ignored rules:
49 # ignored rules:
@@ -43,6 +73,7 @@ tests() {
44 pep8_check
74 pep8_check
45 unit_tests
75 unit_tests
46 robot_tests
77 robot_tests
@@ -88,6 +119,7 @@ Commands
88 unit_tests - Run unit tests
119 unit_tests - Run unit tests
89 update_dev_packages - Check & update development and production dependency changes
120 update_dev_packages - Check & update development and production dependency changes
90 update_packages - Check & update dependency changes
121 update_packages - Check & update dependency changes
122+ check_geckodriver - Check & download geckodriver (required for robot_tests)