PLAT-1834 Support running a11y tests in tox
This commit is contained in:
@@ -1,15 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# accessibility-tests.sh
|
||||
#
|
||||
# Execute the accessibility tests for edx-platform.
|
||||
#
|
||||
# If the optional `DJANGO_VERSION` environment variable is defined, it
|
||||
# specifies which version of Django should be installed when running the
|
||||
# tests inside a `tox` virtualenv. If undefined, the tests are run using
|
||||
# the currently active Python environment.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
if [[ $DJANGO_VERSION == '1.11' ]]; then
|
||||
TOX="tox -e py27-django111 --"
|
||||
elif [[ $DJANGO_VERSION == '1.10' ]]; then
|
||||
TOX="tox -e py27-django110 --"
|
||||
elif [[ $DJANGO_VERSION == '1.9' ]]; then
|
||||
TOX="tox -e py27-django19 --"
|
||||
else
|
||||
TOX=""
|
||||
fi
|
||||
|
||||
|
||||
echo "Setting up for accessibility tests..."
|
||||
source scripts/jenkins-common.sh
|
||||
|
||||
echo "Running explicit accessibility tests..."
|
||||
SELENIUM_BROWSER=phantomjs paver test_a11y
|
||||
SELENIUM_BROWSER=phantomjs $TOX paver test_a11y
|
||||
|
||||
# The settings that we use are installed with the pa11ycrawler module
|
||||
export SCRAPY_SETTINGS_MODULE='pa11ycrawler.settings'
|
||||
|
||||
echo "Running pa11ycrawler against test course..."
|
||||
paver pa11ycrawler --fasttest --skip-clean --fetch-course --with-html
|
||||
$TOX paver pa11ycrawler --fasttest --skip-clean --fetch-course --with-html
|
||||
|
||||
2
tox.ini
2
tox.ini
@@ -23,7 +23,6 @@ toxworkdir={homedir}/edxapp_toxenv
|
||||
# and look in site-packages.
|
||||
usedevelop=True
|
||||
setenv =
|
||||
# Instruct paver not to install the packages tox just installed
|
||||
PYTHONHASHSEED=0
|
||||
TOXENV={envname}
|
||||
passenv =
|
||||
@@ -38,6 +37,7 @@ passenv =
|
||||
NODE_PATH
|
||||
NODE_VIRTUAL_ENV
|
||||
NPM_CONFIG_PREFIX
|
||||
SCRAPY_SETTINGS_MODULE
|
||||
SELENIUM_BROWSER
|
||||
SELENIUM_HOST
|
||||
SELENIUM_PORT
|
||||
|
||||
Reference in New Issue
Block a user