diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-06-26 20:45:08 -0400 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-06-28 11:59:04 +0000 |
commit | fea826077113265cdaf0a341fb9aac330705c8b8 (patch) | |
tree | e1d6f449defcafcdb75def77011dd273c0a54f79 /test/framework.py | |
parent | 8d879e1a6bac47240a232893e914815f781fd4bf (diff) |
tests: handle TypeErrors in calls to VppDiedError
Type: test
Change-Id: I869768ed25efa3350f025fba329466db69805803
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/framework.py b/test/framework.py index 79dfe1ae866..aedfbdf8e52 100644 --- a/test/framework.py +++ b/test/framework.py @@ -84,7 +84,7 @@ class VppDiedError(Exception): try: self.signal_name = VppDiedError.signals_by_value[-rv] - except KeyError: + except (KeyError, TypeError): pass if testcase is None and method_name is None: @@ -681,10 +681,9 @@ class VppTestCase(unittest.TestCase): super(VppTestCase, self).setUp() self.reporter.send_keep_alive(self) if self.vpp_dead: - raise VppDiedError(self.__class__.__name__, self._testMethodName, - "VPP is dead when setting up the test " - "(%s.%s)." % (self.__class__.__name__, - self._testMethodName)) + + raise VppDiedError(rv=None, testcase=self.__class__.__name__, + method_name=self._testMethodName) self.sleep(.1, "during setUp") self.vpp_stdout_deque.append( "--- test setUp() for %s.%s(%s) starts here ---\n" % |