projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a29eb3
)
Write OpenOCD log when it crashes early.
author
Tim Newsome
<tim@sifive.com>
Mon, 19 Jun 2017 16:13:51 +0000
(09:13 -0700)
committer
Tim Newsome
<tim@sifive.com>
Mon, 19 Jun 2017 16:13:51 +0000
(09:13 -0700)
debug/testlib.py
patch
|
blob
|
history
diff --git
a/debug/testlib.py
b/debug/testlib.py
index 30d49e626dcc4133b5506f790858fe6562cd055c..30c31c5325af3d4fd68aadbff1403f669c410e17 100644
(file)
--- a/
debug/testlib.py
+++ b/
debug/testlib.py
@@
-208,6
+208,8
@@
class Openocd(object):
if "Ready for Remote Connections" in log:
break
if not self.process.poll() is None:
if "Ready for Remote Connections" in log:
break
if not self.process.poll() is None:
+ header("OpenOCD log")
+ sys.stdout.write(log)
raise Exception(
"OpenOCD exited before completing riscv_examine()")
if not messaged and time.time() - start > 1:
raise Exception(
"OpenOCD exited before completing riscv_examine()")
if not messaged and time.time() - start > 1:
@@
-421,12
+423,12
@@
def run_tests(parsed, target, todo):
sys.stdout = log_fd
try:
result = instance.run()
sys.stdout = log_fd
try:
result = instance.run()
+ log_fd.write("Result: %s\n" % result)
finally:
sys.stdout = real_stdout
finally:
sys.stdout = real_stdout
+ log_fd.write("Time elapsed: %.2fs\n" % (time.time() - start))
print "%s in %.2fs" % (result, time.time() - start)
sys.stdout.flush()
print "%s in %.2fs" % (result, time.time() - start)
sys.stdout.flush()
- log_fd.write("Result: %s\n" % result)
- log_fd.write("Time elapsed: %.2fs\n" % (time.time() - start))
results.setdefault(result, []).append(name)
count += 1
if result not in good_results and parsed.fail_fast:
results.setdefault(result, []).append(name)
count += 1
if result not in good_results and parsed.fail_fast: