Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
b42bb54f
Commit
b42bb54f
authored
Jul 08, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support XML report generation in sharded test runs
parent
ab654516
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
runtests.py
runtests.py
+9
-3
No files found.
runtests.py
View file @
b42bb54f
...
@@ -1863,8 +1863,11 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -1863,8 +1863,11 @@ def runtests(options, cmd_args, coverage=None):
ROOTDIR = os.path.abspath(options.root_dir)
ROOTDIR = os.path.abspath(options.root_dir)
WORKDIR = os.path.abspath(options.work_dir)
WORKDIR = os.path.abspath(options.work_dir)
xml_output_dir = options.xml_output_dir
if options.shard_num > -1:
if options.shard_num > -1:
WORKDIR = os.path.join(WORKDIR, str(options.shard_num))
WORKDIR = os.path.join(WORKDIR, str(options.shard_num))
if xml_output_dir:
xml_output_dir = os.path.join(xml_output_dir, 'shard-%03d' % options.shard_num)
# RUN ALL TESTS!
# RUN ALL TESTS!
UNITTEST_MODULE = "Cython"
UNITTEST_MODULE = "Cython"
...
@@ -1902,7 +1905,7 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -1902,7 +1905,7 @@ def runtests(options, cmd_args, coverage=None):
sys.path.insert(0, os.path.split(libpath)[0])
sys.path.insert(0, os.path.split(libpath)[0])
CFLAGS.append("-DCYTHON_REFNANNY=1")
CFLAGS.append("-DCYTHON_REFNANNY=1")
if
options.
xml_output_dir and options.fork:
if xml_output_dir and options.fork:
# doesn't currently work together
# doesn't currently work together
sys.stderr.write("Disabling forked testing to support XML test output
\
n
")
sys.stderr.write("Disabling forked testing to support XML test output
\
n
")
options.fork = False
options.fork = False
...
@@ -2024,9 +2027,12 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -2024,9 +2027,12 @@ def runtests(options, cmd_args, coverage=None):
sys.stderr.write("Including CPython regression tests in %s
\
n
" % sys_pyregr_dir)
sys.stderr.write("Including CPython regression tests in %s
\
n
" % sys_pyregr_dir)
test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr'))
test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr'))
if
options.
xml_output_dir:
if xml_output_dir:
from Cython.Tests.xmlrunner import XMLTestRunner
from Cython.Tests.xmlrunner import XMLTestRunner
test_runner = XMLTestRunner(output=options.xml_output_dir,
if not os.path.exists(xml_output_dir):
try: os.makedirs(xml_output_dir)
except OSError: pass # concurrency issue?
test_runner = XMLTestRunner(output=xml_output_dir,
verbose=options.verbosity > 0)
verbose=options.verbosity > 0)
else:
else:
test_runner = unittest.TextTestRunner(verbosity=options.verbosity)
test_runner = unittest.TextTestRunner(verbosity=options.verbosity)
...
...
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