summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyke van Laethem <aykevanlaethem@gmail.com>2018-07-18 15:45:23 +0200
committerDamien George <damien.p.george@gmail.com>2018-07-20 09:27:28 +1000
commit055ee1891977f7ce43c99c6fb31b9a15ee22896f (patch)
treea734478c270c40973518efd9d1dc2951f5f324e3
parent1b88433f2dbe9ea7d0810923ab0bdc193c4bd5ed (diff)
tests/run-tests: Improve crash reporting when running on remote targets.
It is very useful to know the actual error when debugging why a test fails.
-rwxr-xr-xtests/run-tests7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/run-tests b/tests/run-tests
index c24fc8299..dd88ac0af 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -143,9 +143,12 @@ def run_micropython(pyb, args, test_file, is_special=False):
pyb.enter_raw_repl()
try:
output_mupy = pyb.execfile(test_file)
- except pyboard.PyboardError:
+ except pyboard.PyboardError as e:
had_crash = True
- output_mupy = b'CRASH'
+ if not is_special and e.args[0] == 'exception':
+ output_mupy = e.args[1] + e.args[2] + b'CRASH'
+ else:
+ output_mupy = b'CRASH'
# canonical form for all ports/platforms is to use \n for end-of-line
output_mupy = output_mupy.replace(b'\r\n', b'\n')