forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccessibility-tests.sh
executable file
·38 lines (31 loc) · 1.2 KB
/
accessibility-tests.sh
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
#!/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 -r -e py27-django111 --"
elif [[ $DJANGO_VERSION == '1.10' ]]; then
TOX="tox -r -e py27-django110 --"
elif [[ $DJANGO_VERSION == '1.9' ]]; then
TOX="tox -r -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 $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..."
$TOX paver pa11ycrawler --fasttest --skip-clean --fetch-course --with-html