Commit 2c0d0882 authored by Stefan Behnel's avatar Stefan Behnel

Prevent the time stamps in the test runner from being captured together with...

Prevent the time stamps in the test runner from being captured together with the output of the C compiler.
parent 2a86c67b
...@@ -2215,7 +2215,7 @@ def time_stamper_thread(interval=10): ...@@ -2215,7 +2215,7 @@ def time_stamper_thread(interval=10):
_xrange = range _xrange = range
import threading import threading
from datetime import datetime import datetime
from time import sleep from time import sleep
if not interval or interval < 0: if not interval or interval < 0:
...@@ -2223,10 +2223,14 @@ def time_stamper_thread(interval=10): ...@@ -2223,10 +2223,14 @@ def time_stamper_thread(interval=10):
yield yield
else: else:
interval = _xrange(interval * 4) interval = _xrange(interval * 4)
now = datetime.now now = datetime.datetime.now
write = sys.__stderr__.write
stop = False stop = False
# We capture stderr in some places.
# => make sure we write to the real (original) stderr of the test runner.
def write(s, stderr=os.dup(2)):
os.write(stderr, s if IS_PY2 else s.encode('ascii'))
def time_stamper(): def time_stamper():
while True: while True:
for _ in interval: for _ in interval:
......
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