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
05640e71
Commit
05640e71
authored
Nov 06, 2018
by
mattip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes from review, add to CHANGES.rst
parent
0460cf6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
25 deletions
+33
-25
CHANGES.rst
CHANGES.rst
+3
-0
runtests.py
runtests.py
+30
-25
No files found.
CHANGES.rst
View file @
05640e71
...
...
@@ -11,6 +11,9 @@ Features added
*
``?``
is
supported
as
NumPy
dtype
for
``
bool
``.
Patch
by
Max
Klein
.
(
Github
issue
#
2675
)
*
``--
no
-
capture
``
added
to
``
runtests
.
py
``
to
prevent
stdout
,
stderr
capturing
during
srctree
tests
Bugs
fixed
----------
...
...
runtests.py
View file @
05640e71
...
...
@@ -2132,9 +2132,10 @@ def main():
if options.xml_output_dir:
shutil.rmtree(options.xml_output_dir, ignore_errors=True)
interval = 10
if not options.capture:
interval = 10000
if options.capture:
keep_alive_interval = 10
else:
keep_alive_interval = None
if options.shard_count > 1 and options.shard_num == -1:
import multiprocessing
pool = multiprocessing.Pool(options.shard_count)
...
...
@@ -2143,7 +2144,7 @@ def main():
# NOTE: create process pool before time stamper thread to avoid forking issues.
total_time = time.time()
stats = Stats()
with time_stamper_thread(interval=interval):
with time_stamper_thread(interval=
keep_alive_
interval):
for shard_num, shard_stats, return_code in pool.imap_unordered(runtests_callback, tasks):
if return_code != 0:
errors.append(shard_num)
...
...
@@ -2160,7 +2161,7 @@ def main():
else:
return_code = 0
else:
with time_stamper_thread(interval=interval):
with time_stamper_thread(interval=
keep_alive_
interval):
_, stats, return_code = runtests(options, cmd_args, coverage)
if coverage:
...
...
@@ -2199,27 +2200,31 @@ def time_stamper_thread(interval=10):
from datetime import datetime
from time import sleep
interval = _xrange(interval * 4)
now = datetime.now
write = sys.__stderr__.write
stop = False
def time_stamper():
while True:
for _ in interval:
if stop:
return
sleep(1./4)
write('
\
n
#### %s
\
n
' % now())
thread = threading.Thread(target=time_stamper, name='time_stamper')
thread.setDaemon(True) # Py2 ...
thread.start()
try:
if not interval or interval < 0:
# Do nothing
yield
finally:
stop = True
thread.join()
else:
interval = _xrange(interval * 4)
now = datetime.now
write = sys.__stderr__.write
stop = False
def time_stamper():
while True:
for _ in interval:
if stop:
return
sleep(1./4)
write('
\
n
#### %s
\
n
' % now())
thread = threading.Thread(target=time_stamper, name='time_stamper')
thread.setDaemon(True) # Py2 ...
thread.start()
try:
yield
finally:
stop = True
thread.join()
def configure_cython(options):
...
...
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