From f68747ec96a37e854a1e2aea16a3d5c6e4f79a11 Mon Sep 17 00:00:00 2001 From: Christine Lytwynec Date: Tue, 26 Apr 2016 13:39:21 -0400 Subject: [PATCH] Speed up pa11ycrawler runs on Jenkins, Update pa11ycrawler to v0.0.2 --- pavelib/bok_choy.py | 4 ++-- requirements/edx/github.txt | 2 +- scripts/accessibility-crawler.sh | 11 ----------- scripts/accessibility-tests.sh | 20 ++++++++++++++++++++ 4 files changed, 23 insertions(+), 14 deletions(-) delete mode 100644 scripts/accessibility-crawler.sh diff --git a/pavelib/bok_choy.py b/pavelib/bok_choy.py index 885a92f571..64966577ab 100644 --- a/pavelib/bok_choy.py +++ b/pavelib/bok_choy.py @@ -134,8 +134,8 @@ def perf_report_bokchoy(options): ('with-html', 'w', 'Include html reports'), make_option('--course-key', help='Course key for test course'), make_option( - "--skip-fetch", - action="store_false", + "--fetch-course", + action="store_true", dest="should_fetch_course", help='Course key for test course', ), diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 8c27b921b6..2976983d4c 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -67,7 +67,7 @@ git+https://github.com/edx/rfc6266.git@v0.0.5-edx#egg=rfc6266==0.0.5-edx # Used for testing git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 -git+https://github.com/edx/pa11ycrawler.git@0.0.1#egg=pa11ycrawler +git+https://github.com/edx/pa11ycrawler.git@0.0.2#egg=pa11ycrawler # Our libraries: git+https://github.com/edx/XBlock.git@xblock-0.4.8#egg=XBlock==0.4.8 diff --git a/scripts/accessibility-crawler.sh b/scripts/accessibility-crawler.sh deleted file mode 100644 index 00b517938c..0000000000 --- a/scripts/accessibility-crawler.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "Setting up for accessibility tests..." -source scripts/jenkins-common.sh - -echo "Running pa11ycrawler against test course..." -paver pa11ycrawler - -echo "Generating coverage report..." -paver pa11ycrawler_coverage diff --git a/scripts/accessibility-tests.sh b/scripts/accessibility-tests.sh index 492a7452ed..9ac5522fc5 100755 --- a/scripts/accessibility-tests.sh +++ b/scripts/accessibility-tests.sh @@ -1,6 +1,17 @@ #!/usr/bin/env bash set -e +############################################################################### +# +# Usage: +# To run just tests, without pa11ycrawler: +# ./scripts/accessibility-tests.sh +# +# To run tests, followed by pa11ycrawler: +# RUN_PA11YCRAWLER=1 ./scripts/accessibility-tests.sh +# +############################################################################### + echo "Setting up for accessibility tests..." source scripts/jenkins-common.sh @@ -9,3 +20,12 @@ SELENIUM_BROWSER=phantomjs paver test_a11y echo "Generating coverage report..." paver a11y_coverage + +if [ "$RUN_PA11YCRAWLER" = "1" ] +then + echo "Running pa11ycrawler against test course..." + paver pa11ycrawler --fasttest --fetch-course --with-html + + echo "Generating coverage report..." + paver pa11ycrawler_coverage +fi