From cf95e52b21a842cb77d39d25a2c1796c6a5be2a2 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 12 Jul 2017 20:26:21 -0700 Subject: [PATCH] Print out logs in more failure cases. --- debug/testlib.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/debug/testlib.py b/debug/testlib.py index c44a763..ce2ec2e 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -540,8 +540,15 @@ class BaseTest(object): def classSetup(self): self.compile() self.target_process = self.target.create() - self.server = self.target.server() - self.logs.append(self.server.logname) + if self.target_process: + self.logs.append(self.target_process.logname) + try: + self.server = self.target.server() + self.logs.append(self.server.logname) + except Exception: + for log in self.logs: + print_log(log) + raise def classTeardown(self): del self.server @@ -564,9 +571,8 @@ class BaseTest(object): self.start = time.time() - self.classSetup() - try: + self.classSetup() self.setup() result = self.test() # pylint: disable=no-member except TestNotApplicable: -- 2.30.2