Commit 688909eb by Minh Tue Vo Committed by Christine Lytwynec

bumping bok choy version

check firefox version, raise exception with instructions for updating
parent 85ede381
...@@ -5,6 +5,7 @@ http://bok-choy.readthedocs.org/en/latest/ ...@@ -5,6 +5,7 @@ http://bok-choy.readthedocs.org/en/latest/
from paver.easy import task, needs, cmdopts, sh from paver.easy import task, needs, cmdopts, sh
from pavelib.utils.test.suites.bokchoy_suite import BokChoyTestSuite from pavelib.utils.test.suites.bokchoy_suite import BokChoyTestSuite
from pavelib.utils.envs import Env from pavelib.utils.envs import Env
from pavelib.utils.test.utils import check_firefox_version
from optparse import make_option from optparse import make_option
try: try:
...@@ -24,6 +25,7 @@ __test__ = False # do not collect ...@@ -24,6 +25,7 @@ __test__ = False # do not collect
make_option("--verbose", action="store_const", const=2, dest="verbosity"), make_option("--verbose", action="store_const", const=2, dest="verbosity"),
make_option("-q", "--quiet", action="store_const", const=0, dest="verbosity"), make_option("-q", "--quiet", action="store_const", const=0, dest="verbosity"),
make_option("-v", "--verbosity", action="count", dest="verbosity"), make_option("-v", "--verbosity", action="count", dest="verbosity"),
make_option("--skip_firefox_version_validation", action='store_false', dest="validate_firefox_version")
]) ])
def test_bokchoy(options): def test_bokchoy(options):
""" """
...@@ -37,6 +39,9 @@ def test_bokchoy(options): ...@@ -37,6 +39,9 @@ def test_bokchoy(options):
- path/to/test.py:TestFoo.test_bar - path/to/test.py:TestFoo.test_bar
It can also be left blank to run all tests in the suite. It can also be left blank to run all tests in the suite.
""" """
if getattr(options, 'validate_firefox_version', True):
check_firefox_version()
opts = { opts = {
'test_spec': getattr(options, 'test_spec', None), 'test_spec': getattr(options, 'test_spec', None),
'fasttest': getattr(options, 'fasttest', False), 'fasttest': getattr(options, 'fasttest', False),
......
...@@ -4,11 +4,11 @@ Helper functions for test tasks ...@@ -4,11 +4,11 @@ Helper functions for test tasks
from paver.easy import sh, task from paver.easy import sh, task
from pavelib.utils.envs import Env from pavelib.utils.envs import Env
import os import os
import subprocess
MONGO_PORT_NUM = int(os.environ.get('EDXAPP_TEST_MONGO_PORT', '27017')) MONGO_PORT_NUM = int(os.environ.get('EDXAPP_TEST_MONGO_PORT', '27017'))
MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost') MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
__test__ = False # do not collect __test__ = False # do not collect
...@@ -53,3 +53,23 @@ def clean_mongo(): ...@@ -53,3 +53,23 @@ def clean_mongo():
port=MONGO_PORT_NUM, port=MONGO_PORT_NUM,
repo_root=Env.REPO_ROOT, repo_root=Env.REPO_ROOT,
)) ))
def check_firefox_version():
"""
Check that firefox is the correct version.
"""
expected_firefox_ver = "Mozilla Firefox 28.0"
firefox_ver = subprocess.check_output("firefox --version", shell=True).strip()
if firefox_ver != expected_firefox_ver:
raise Exception(
'Required firefox version not found.\n\n'
'To install the required version:\n'
'As the root user in devstack, run the following:\n\n'
'\t$ sudo wget -O /tmp/firefox_28.deb https://s3.amazonaws.com/vagrant.testeng.edx.org/firefox_28.0%2Bbuild2-0ubuntu0.12.04.1_amd64.deb\n'
'\t$ sudo gdebi -nq /tmp/firefox_28.deb\n\n'
'Confirm the new version:\n'
'\t$ firefox --version\n'
'\t{version}'.format(version=expected_firefox_ver)
)
...@@ -124,7 +124,7 @@ pep8==1.4.5 ...@@ -124,7 +124,7 @@ pep8==1.4.5
pylint==0.28 pylint==0.28
python-subunit==0.0.16 python-subunit==0.0.16
rednose==0.3 rednose==0.3
selenium==2.39.0 selenium==2.42.1
splinter==0.5.4 splinter==0.5.4
testtools==0.9.34 testtools==0.9.34
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
-e git+https://github.com/edx/django-waffle.git@823a102e48#egg=django-waffle -e git+https://github.com/edx/django-waffle.git@823a102e48#egg=django-waffle
-e git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking -e git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking
-e git+https://github.com/edx/edx-analytics-data-api-client.git@0.1.0#egg=edx-analytics-data-api-client -e git+https://github.com/edx/edx-analytics-data-api-client.git@0.1.0#egg=edx-analytics-data-api-client
-e git+https://github.com/edx/bok-choy.git@15756f029016e033c658380f77218fe8467948b5#egg=bok_choy -e git+https://github.com/edx/bok-choy.git@2e6eab960a97fe41778292fe8e1b2f0b69a1be2d#egg=bok_choy
-e git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash -e git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash
-e git+https://github.com/edx/acid-block.git@459aff7b63db8f2c5decd1755706c1a64fb4ebb1#egg=acid-xblock -e git+https://github.com/edx/acid-block.git@459aff7b63db8f2c5decd1755706c1a64fb4ebb1#egg=acid-xblock
-e git+https://github.com/edx/edx-ora2.git@release-2014-08-08T13.47#egg=edx-ora2 -e git+https://github.com/edx/edx-ora2.git@release-2014-08-08T13.47#egg=edx-ora2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment