Commit 9f286906 authored by Robert Bradshaw's avatar Robert Bradshaw Committed by GitHub

Merge pull request #2626 from mattip/subtree-fail

MAINT: if subtree test fails, print out all stdout, stderr not just last
parents cf7b60ff d07748a1
......@@ -1735,6 +1735,9 @@ class EndToEndTest(unittest.TestCase):
old_path = os.environ.get('PYTHONPATH')
env = dict(os.environ)
env['PYTHONPATH'] = self.cython_syspath + os.pathsep + (old_path or '')
cmd = []
out = []
err = []
for command_no, command in enumerate(filter(None, commands.splitlines()), 1):
with self.stats.time('%s(%d)' % (self.name, command_no), 'c',
'etoe-build' if ' setup.py ' in command else 'etoe-run'):
......@@ -1743,11 +1746,15 @@ class EndToEndTest(unittest.TestCase):
stdout=subprocess.PIPE,
shell=True,
env=env)
out, err = p.communicate()
_out, _err = p.communicate()
cmd.append(command)
out.append(_out)
err.append(_err)
res = p.returncode
if res != 0:
sys.stderr.write("%s\n%s\n%s\n" % (
command, self._try_decode(out), self._try_decode(err)))
for c, o, e in zip(cmd, out, err):
sys.stderr.write("%s\n%s\n%s\n\n" % (
c, self._try_decode(o), self._try_decode(e)))
self.assertEqual(0, res, "non-zero exit status")
self.success = True
......
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