diff options
author | mattip <matti.picus@gmail.com> | 2018-09-24 23:49:12 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2018-09-24 23:49:12 +0300 |
commit | d07748a1df63eba4dfa7da8f651a1bce60c6c666 (patch) | |
tree | 59fc07f6aae6b2f9ee04fa006ef2180dba52941d | |
parent | b6509bf791bfe44abbbaa957ae530e5910815dfd (diff) | |
download | cython-d07748a1df63eba4dfa7da8f651a1bce60c6c666.tar.gz |
MAINT: if subtree test fails, print out all stdout, stderr not just last
-rwxr-xr-x | runtests.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/runtests.py b/runtests.py index 4d9f58fd6..59f55ec4f 100755 --- a/runtests.py +++ b/runtests.py @@ -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 |