diff options
author | David Lechner <david@lechnology.com> | 2017-09-24 20:15:48 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-09-26 11:59:11 +1000 |
commit | 62849b7010abffb7b0a9c9875930efe7cb77519c (patch) | |
tree | df719db4ca96bffd7bad42f0823feaf9cc30f81a /tests | |
parent | 9d836fedbdb1d28bdfc4ba475bbdfc1adb3f007a (diff) |
py: Add config option to print warnings/errors to stderr.
This adds a new configuration option to print runtime warnings and errors to
stderr. On Unix, CPython prints warnings and unhandled exceptions to stderr,
so the unix port here is configured to use this option.
The unix port already printed unhandled exceptions on the main thread to
stderr. This patch fixes unhandled exceptions on other threads and warnings
(issue #2838) not printing on stderr.
Additionally, a couple tests needed to be fixed to handle this new behavior.
This is done by also capturing stderr when running tests.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run-tests | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/run-tests b/tests/run-tests index 568d99f8e..23fc3d910 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -103,7 +103,7 @@ def run_micropython(pyb, args, test_file, is_special=False): os.close(master) os.close(slave) else: - output_mupy = subprocess.check_output(args + [test_file]) + output_mupy = subprocess.check_output(args + [test_file], stderr=subprocess.STDOUT) except subprocess.CalledProcessError: return b'CRASH' @@ -124,7 +124,7 @@ def run_micropython(pyb, args, test_file, is_special=False): # run the actual test try: - output_mupy = subprocess.check_output(cmdlist) + output_mupy = subprocess.check_output(cmdlist, stderr=subprocess.STDOUT) except subprocess.CalledProcessError: output_mupy = b'CRASH' |