diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2018-09-24 23:30:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 23:30:38 +0200 |
commit | 9f2869067b2cf8e86aa0c52fad90a477fe7fae87 (patch) | |
tree | 91a3858b79a92ca0bd9312ef7125925b58e2d55f | |
parent | cf7b60ff6814ce8faf7fab2990c423452faa2f0a (diff) | |
parent | d07748a1df63eba4dfa7da8f651a1bce60c6c666 (diff) | |
download | cython-9f2869067b2cf8e86aa0c52fad90a477fe7fae87.tar.gz |
Merge pull request #2626 from mattip/subtree-fail
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 |