Commit 05640e71 authored by mattip's avatar mattip

fixes from review, add to CHANGES.rst

parent 0460cf6f
...@@ -11,6 +11,9 @@ Features added ...@@ -11,6 +11,9 @@ Features added
* ``?`` is supported as NumPy dtype for ``bool``. * ``?`` is supported as NumPy dtype for ``bool``.
Patch by Max Klein. (Github issue #2675) Patch by Max Klein. (Github issue #2675)
* ``--no-capture`` added to ``runtests.py`` to prevent stdout,stderr capturing
during srctree tests
Bugs fixed Bugs fixed
---------- ----------
......
...@@ -2132,9 +2132,10 @@ def main(): ...@@ -2132,9 +2132,10 @@ def main():
if options.xml_output_dir: if options.xml_output_dir:
shutil.rmtree(options.xml_output_dir, ignore_errors=True) shutil.rmtree(options.xml_output_dir, ignore_errors=True)
interval = 10 if options.capture:
if not options.capture: keep_alive_interval = 10
interval = 10000 else:
keep_alive_interval = None
if options.shard_count > 1 and options.shard_num == -1: if options.shard_count > 1 and options.shard_num == -1:
import multiprocessing import multiprocessing
pool = multiprocessing.Pool(options.shard_count) pool = multiprocessing.Pool(options.shard_count)
...@@ -2143,7 +2144,7 @@ def main(): ...@@ -2143,7 +2144,7 @@ def main():
# NOTE: create process pool before time stamper thread to avoid forking issues. # NOTE: create process pool before time stamper thread to avoid forking issues.
total_time = time.time() total_time = time.time()
stats = Stats() 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): for shard_num, shard_stats, return_code in pool.imap_unordered(runtests_callback, tasks):
if return_code != 0: if return_code != 0:
errors.append(shard_num) errors.append(shard_num)
...@@ -2160,7 +2161,7 @@ def main(): ...@@ -2160,7 +2161,7 @@ def main():
else: else:
return_code = 0 return_code = 0
else: else:
with time_stamper_thread(interval=interval): with time_stamper_thread(interval=keep_alive_interval):
_, stats, return_code = runtests(options, cmd_args, coverage) _, stats, return_code = runtests(options, cmd_args, coverage)
if coverage: if coverage:
...@@ -2199,27 +2200,31 @@ def time_stamper_thread(interval=10): ...@@ -2199,27 +2200,31 @@ def time_stamper_thread(interval=10):
from datetime import datetime from datetime import datetime
from time import sleep from time import sleep
interval = _xrange(interval * 4) if not interval or interval < 0:
now = datetime.now # Do nothing
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 yield
finally: else:
stop = True interval = _xrange(interval * 4)
thread.join() 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): def configure_cython(options):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment