From: Tim Newsome Date: Tue, 12 Sep 2017 18:21:06 +0000 (-0700) Subject: Call postMortem() when a test fails. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=706b6476a2eb320a84fef39716a7c19a83b68a39;p=riscv-tests.git Call postMortem() when a test fails. --- diff --git a/debug/testlib.py b/debug/testlib.py index c41c332..bb81cfb 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -588,6 +588,9 @@ class BaseTest(object): del self.server del self.target_process + def postMortem(self): + pass + def run(self): """ If compile_args is set, compile a program and set self.binary. @@ -621,6 +624,7 @@ class BaseTest(object): print e.message header("Traceback") traceback.print_exc(file=sys.stdout) + self.postMortem() return result finally: @@ -665,6 +669,12 @@ class GdbTest(BaseTest): # FIXME: OpenOCD doesn't handle PRIV now #self.gdb.p("$priv=3") + def postMortem(self): + if not self.gdb: + return + self.gdb.interrupt() + self.gdb.command("info registers all", timeout=10) + def classTeardown(self): del self.gdb BaseTest.classTeardown(self) diff --git a/env b/env index 1b76fd1..db0bfa2 160000 --- a/env +++ b/env @@ -1 +1 @@ -Subproject commit 1b76fd1f1c63dfe4cea93f426434a7384d2bf801 +Subproject commit db0bfa223142e56b17dae6d92610f195014bbb80