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
6222b1cd
Commit
6222b1cd
authored
Jun 20, 2016
by
Calen Pennington
Committed by
GitHub
Jun 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12749 from cpennington/jenkins-concurrent-unit-tests
Jenkins concurrent unit tests
parents
df399de1
b839b048
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
13 deletions
+21
-13
.coveragerc
+2
-0
docs/en_us/internal/testing.rst
+10
-4
pavelib/utils/test/suites/nose_suite.py
+1
-2
pavelib/utils/test/suites/suite.py
+1
-1
scripts/generic-ci-tests.sh
+7
-6
No files found.
.coveragerc
View file @
6222b1cd
...
...
@@ -26,6 +26,8 @@ omit =
openedx/core/djangoapps/*/migrations/*
openedx/core/djangoapps/debug/*
concurrency=multiprocessing
[report]
ignore_errors = True
...
...
docs/en_us/internal/testing.rst
View file @
6222b1cd
...
...
@@ -208,10 +208,16 @@ To run a single test format the command like this.
paver test_system -t lms/djangoapps/courseware/tests/tests.py:ActivateLoginTest.test_activate_login
The ``lms`` suite of tests runs concurrently, and with randomized order, by default.
You can override these by using ``--no-randomize`` to disable randomization,
and ``--processes=N`` to control how many tests will run concurrently (``0`` will
disable concurrency). For example:
The ``lms`` suite of tests runs with randomized order, by default.
You can override these by using ``--no-randomize`` to disable randomization.
You can also enable test concurrency with the ``--processes=N`` flag (where ``N``
is the number of processes to run tests with, and ``-1`` means one process per
available core). Note, however, that when running concurrently, breakpoints may
not work correctly, and you will not be able to run single test methods (only
single test classes).
For example:
::
# This will run all tests in the order that they appear in their files, serially
...
...
pavelib/utils/test/suites/nose_suite.py
View file @
6222b1cd
...
...
@@ -126,8 +126,7 @@ class SystemTestSuite(NoseTestSuite):
self
.
randomize
=
kwargs
.
get
(
'randomize'
,
None
)
if
self
.
processes
is
None
:
# Use one process per core for LMS tests, and no multiprocessing
# otherwise.
# Don't use multiprocessing by default
self
.
processes
=
0
self
.
processes
=
int
(
self
.
processes
)
...
...
pavelib/utils/test/suites/suite.py
View file @
6222b1cd
...
...
@@ -25,7 +25,7 @@ class TestSuite(object):
self
.
root
=
args
[
0
]
self
.
subsuites
=
kwargs
.
get
(
'subsuites'
,
[])
self
.
failed_suites
=
[]
self
.
verbosity
=
kwargs
.
get
(
'verbosity'
,
1
)
self
.
verbosity
=
int
(
kwargs
.
get
(
'verbosity'
,
1
)
)
self
.
skip_clean
=
kwargs
.
get
(
'skip_clean'
,
False
)
self
.
pdb
=
kwargs
.
get
(
'pdb'
,
False
)
...
...
scripts/generic-ci-tests.sh
View file @
6222b1cd
...
...
@@ -99,22 +99,23 @@ case "$TEST_SUITE" in
;;
"lms-unit"
)
LMS_ARGS
=
"--with-flaky"
EXTRA_ARGS
=
"--with-flaky"
PAVER_ARGS
=
"--processes=-1 --cov_args='-p' -v"
case
"
$SHARD
"
in
"all"
)
paver test_system
-s
lms
--extra_args
=
"
$
LMS_ARGS
"
--cov_args
=
"-p"
-v
paver test_system
-s
lms
--extra_args
=
"
$
EXTRA_ARGS
"
$PAVER_ARGS
;;
"1"
)
paver test_system
-s
lms
--extra_args
=
"--attr='shard_1'
$
LMS_ARGS
"
--cov_args
=
"-p"
-v
paver test_system
-s
lms
--extra_args
=
"--attr='shard_1'
$
EXTRA_ARGS
"
$PAVER_ARGS
;;
"2"
)
paver test_system
-s
lms
--extra_args
=
"--attr='shard_2'
$
LMS_ARGS
"
--cov_args
=
"-p"
-v
paver test_system
-s
lms
--extra_args
=
"--attr='shard_2'
$
EXTRA_ARGS
"
$PAVER_ARGS
;;
"3"
)
paver test_system
-s
lms
--extra_args
=
"--attr='shard_3'
$
LMS_ARGS
"
--cov_args
=
"-p"
-v
paver test_system
-s
lms
--extra_args
=
"--attr='shard_3'
$
EXTRA_ARGS
"
$PAVER_ARGS
;;
"4"
)
paver test_system
-s
lms
--extra_args
=
"--attr='shard_1=False,shard_2=False,shard_3=False'
$
LMS_ARGS
"
--cov_args
=
"-p"
-v
paver test_system
-s
lms
--extra_args
=
"--attr='shard_1=False,shard_2=False,shard_3=False'
$
EXTRA_ARGS
"
$PAVER_ARGS
;;
*
)
# If no shard is specified, rather than running all tests, create an empty xunit file. This is a
...
...
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