Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a6b55c2d
Commit
a6b55c2d
authored
Nov 07, 2017
by
Michael Youngstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove coverage reports for a11y and bokchoy tests by default
parent
8eb19002
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
23 deletions
+20
-23
pavelib/bok_choy.py
+3
-2
pavelib/paver_tests/test_paver_bok_choy_cmds.py
+1
-3
pavelib/utils/test/bokchoy_options.py
+0
-1
pavelib/utils/test/bokchoy_utils.py
+7
-6
pavelib/utils/test/suites/bokchoy_suite.py
+9
-5
scripts/accessibility-tests.sh
+0
-6
No files found.
pavelib/bok_choy.py
View file @
a6b55c2d
...
...
@@ -51,6 +51,7 @@ def test_bokchoy(options, passthrough_options):
# firefox as the default here.
using_firefox
=
(
os
.
environ
.
get
(
'SELENIUM_BROWSER'
,
'firefox'
)
==
'firefox'
)
validate_firefox
=
getattr
(
options
,
'validate_firefox_version'
,
using_firefox
)
options
.
test_bokchoy
.
coveragerc
=
options
.
get
(
'coveragerc'
,
None
)
if
validate_firefox
:
check_firefox_version
()
...
...
@@ -81,8 +82,8 @@ def test_a11y(options, passthrough_options):
# Modify the options object directly, so that any subsequently called tasks
# that share with this task get the modified options
options
.
test_a11y
.
report_dir
=
Env
.
BOK_CHOY_A11Y_REPORT_DIR
options
.
test_a11y
.
coveragerc
=
Env
.
BOK_CHOY_A11Y_COVERAGERC
options
.
test_a11y
.
extra_args
=
options
.
get
(
'extra_args'
,
''
)
+
' -a "a11y" '
options
.
test_a11y
.
coveragerc
=
options
.
get
(
'coveragerc'
,
None
)
run_bokchoy
(
options
.
test_a11y
,
passthrough_options
)
...
...
@@ -120,7 +121,7 @@ def pa11ycrawler(options, passthrough_options):
# Modify the options object directly, so that any subsequently called tasks
# that share with this task get the modified options
options
.
pa11ycrawler
.
report_dir
=
Env
.
PA11YCRAWLER_REPORT_DIR
options
.
pa11ycrawler
.
coveragerc
=
Env
.
PA11YCRAWLER_COVERAGERC
options
.
pa11ycrawler
.
coveragerc
=
options
.
get
(
'coveragerc'
,
None
)
options
.
pa11ycrawler
.
should_fetch_course
=
getattr
(
options
,
'should_fetch_course'
,
...
...
pavelib/paver_tests/test_paver_bok_choy_cmds.py
View file @
a6b55c2d
...
...
@@ -41,9 +41,7 @@ class TestPaverBokChoyCmd(unittest.TestCase):
),
"SELENIUM_DRIVER_LOG_DIR='{}/test_root/log{}'"
.
format
(
REPO_DIR
,
shard_str
),
"VERIFY_XSS='{}'"
.
format
(
verify_xss
),
"coverage"
,
"run"
,
"--rcfile={}"
.
format
(
Env
.
BOK_CHOY_COVERAGERC
),
"python"
,
"-m"
,
"pytest"
,
"{}/common/test/acceptance/{}"
.
format
(
REPO_DIR
,
name
),
...
...
pavelib/utils/test/bokchoy_options.py
View file @
a6b55c2d
...
...
@@ -26,7 +26,6 @@ BOKCHOY_EVAL_ATTR = make_option(
BOKCHOY_FASTTEST
=
make_option
(
'--fasttest'
,
action
=
'store_true'
,
help
=
'Skip some setup'
)
BOKCHOY_COVERAGERC
=
make_option
(
'--coveragerc'
,
default
=
Env
.
BOK_CHOY_COVERAGERC
,
help
=
'coveragerc file to use during this test'
)
...
...
pavelib/utils/test/bokchoy_utils.py
View file @
a6b55c2d
...
...
@@ -30,7 +30,7 @@ def start_servers(options):
"""
Start the servers we will run tests on, returns PIDs for servers.
"""
coveragerc
=
options
.
get
(
'coveragerc'
,
Env
.
BOK_CHOY_COVERAGERC
)
coveragerc
=
options
.
get
(
'coveragerc'
,
None
)
def
start_server
(
cmd
,
logfile
,
cwd
=
None
):
"""
...
...
@@ -41,13 +41,14 @@ def start_servers(options):
for
service
,
info
in
Env
.
BOK_CHOY_SERVERS
.
iteritems
():
address
=
"0.0.0.0:{}"
.
format
(
info
[
'port'
])
cmd
=
(
"DEFAULT_STORE={default_store} "
"coverage run --rcfile={coveragerc} -m "
cmd
=
(
"DEFAULT_STORE={default_store} "
)
.
format
(
default_store
=
options
.
default_store
)
if
coveragerc
:
cmd
+=
(
"coverage run --rcfile={coveragerc} -m "
)
.
format
(
coveragerc
=
coveragerc
)
else
:
cmd
+=
"python -m "
cmd
+=
(
"manage {service} --settings {settings} runserver "
"{address} --traceback --noreload"
.
format
(
default_store
=
options
.
default_store
,
coveragerc
=
coveragerc
,
service
=
service
,
settings
=
Env
.
SETTINGS
,
address
=
address
,
...
...
pavelib/utils/test/suites/bokchoy_suite.py
View file @
a6b55c2d
...
...
@@ -205,7 +205,7 @@ class BokChoyTestSuite(TestSuite):
self
.
har_dir
=
self
.
log_dir
/
'hars'
self
.
a11y_file
=
Env
.
BOK_CHOY_A11Y_CUSTOM_RULES_FILE
self
.
imports_dir
=
kwargs
.
get
(
'imports_dir'
,
None
)
self
.
coveragerc
=
kwargs
.
get
(
'coveragerc'
,
Env
.
BOK_CHOY_COVERAGERC
)
self
.
coveragerc
=
kwargs
.
get
(
'coveragerc'
,
None
)
self
.
save_screenshots
=
kwargs
.
get
(
'save_screenshots'
,
False
)
def
__enter__
(
self
):
...
...
@@ -333,12 +333,16 @@ class BokChoyTestSuite(TestSuite):
]
if
self
.
save_screenshots
:
cmd
.
append
(
"NEEDLE_SAVE_BASELINE=True"
)
cmd
+=
[
"coverage"
,
"run"
,
]
if
self
.
coveragerc
:
cmd
+=
[
"coverage"
,
"run"
,
]
cmd
.
append
(
"--rcfile={}"
.
format
(
self
.
coveragerc
))
else
:
cmd
+=
[
"python"
]
cmd
+=
[
"-m"
,
"pytest"
,
...
...
scripts/accessibility-tests.sh
View file @
a6b55c2d
...
...
@@ -8,14 +8,8 @@ source scripts/jenkins-common.sh
echo
"Running explicit accessibility tests..."
SELENIUM_BROWSER
=
phantomjs paver test_a11y
echo
"Generating coverage report..."
paver a11y_coverage
# 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
echo
"Generating pa11ycrawler coverage report..."
paver pa11ycrawler_coverage
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment