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
c3ebad65
Unverified
Commit
c3ebad65
authored
Nov 02, 2017
by
Stu Young
Committed by
GitHub
Nov 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16401 from edx/estute/disable-capturing-stderr-in-pytest-output
add option to disable capturing stderr in pytest
parents
564514dd
77ed0ed4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
pavelib/tests.py
+8
-0
pavelib/utils/test/suites/pytest_suite.py
+6
-0
scripts/generic-ci-tests.sh
+5
-5
No files found.
pavelib/tests.py
View file @
c3ebad65
...
...
@@ -50,6 +50,10 @@ __test__ = False # do not collect
make_option
(
"-q"
,
"--quiet"
,
action
=
"store_const"
,
const
=
0
,
dest
=
"verbosity"
),
make_option
(
"-v"
,
"--verbosity"
,
action
=
"count"
,
dest
=
"verbosity"
,
default
=
1
),
make_option
(
"--disable_capture"
,
action
=
"store_true"
,
dest
=
"disable_capture"
,
help
=
"Disable capturing of stdout/stderr"
),
make_option
(
'--disable-migrations'
,
action
=
'store_true'
,
dest
=
'disable_migrations'
,
...
...
@@ -132,6 +136,10 @@ def test_system(options, passthrough_options):
make_option
(
"--verbose"
,
action
=
"store_const"
,
const
=
2
,
dest
=
"verbosity"
),
make_option
(
"-q"
,
"--quiet"
,
action
=
"store_const"
,
const
=
0
,
dest
=
"verbosity"
),
make_option
(
"-v"
,
"--verbosity"
,
action
=
"count"
,
dest
=
"verbosity"
,
default
=
1
),
make_option
(
"--disable_capture"
,
action
=
"store_true"
,
dest
=
"disable_capture"
,
help
=
"Disable capturing of stdout/stderr"
),
],
share_with
=
[
'pavelib.utils.test.utils.clean_reports_dir'
])
@PassthroughTask
@timed
...
...
pavelib/utils/test/suites/pytest_suite.py
View file @
c3ebad65
...
...
@@ -32,6 +32,7 @@ class PytestSuite(TestSuite):
self
.
django_toxenv
=
'py27-django111'
else
:
self
.
django_toxenv
=
'py27-django18'
self
.
disable_capture
=
kwargs
.
get
(
'disable_capture'
,
None
)
self
.
report_dir
=
Env
.
REPORT_DIR
/
self
.
root
# If set, put reports for run in "unique" directories.
...
...
@@ -144,6 +145,9 @@ class SystemTestSuite(PytestSuite):
elif
self
.
verbosity
>
1
:
cmd
.
append
(
"--verbose"
)
if
self
.
disable_capture
:
cmd
.
append
(
"-s"
)
if
self
.
processes
==
-
1
:
cmd
.
append
(
'-n auto'
)
cmd
.
append
(
'--dist=loadscope'
)
...
...
@@ -230,6 +234,8 @@ class LibTestSuite(PytestSuite):
cmd
.
append
(
"--quiet"
)
elif
self
.
verbosity
>
1
:
cmd
.
append
(
"--verbose"
)
if
self
.
disable_capture
:
cmd
.
append
(
"-s"
)
cmd
.
append
(
self
.
test_id
)
return
self
.
_under_coverage_cmd
(
cmd
)
...
...
scripts/generic-ci-tests.sh
View file @
c3ebad65
...
...
@@ -111,13 +111,13 @@ case "$TEST_SUITE" in
"lms-unit"
)
case
"
$SHARD
"
in
"all"
)
paver test_system
-s
lms
$PAVER_ARGS
$PARALLEL
2> lms-tests.log
paver test_system
-s
lms
--disable_capture
$PAVER_ARGS
$PARALLEL
2> lms-tests.log
;;
[
1-3]
)
paver test_system
-s
lms
--eval-attr
=
"shard==
$SHARD
"
$PAVER_ARGS
$PARALLEL
2> lms-tests.
$SHARD
.log
paver test_system
-s
lms
--
disable_capture
--
eval-attr
=
"shard==
$SHARD
"
$PAVER_ARGS
$PARALLEL
2> lms-tests.
$SHARD
.log
;;
4|
"noshard"
)
paver test_system
-s
lms
--eval-attr
=
'not shard'
$PAVER_ARGS
$PARALLEL
2> lms-tests.4.log
paver test_system
-s
lms
--
disable_capture
--
eval-attr
=
'not shard'
$PAVER_ARGS
$PARALLEL
2> lms-tests.4.log
;;
*
)
# If no shard is specified, rather than running all tests, create an empty xunit file. This is a
...
...
@@ -131,11 +131,11 @@ case "$TEST_SUITE" in
;;
"cms-unit"
)
paver test_system
-s
cms
$PAVER_ARGS
2> cms-tests.log
paver test_system
-s
cms
--disable_capture
$PAVER_ARGS
2> cms-tests.log
;;
"commonlib-unit"
)
paver test_lib
$PAVER_ARGS
2> common-tests.log
paver test_lib
--disable_capture
$PAVER_ARGS
2> common-tests.log
;;
"js-unit"
)
...
...
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