make test: Copy api_post_mortem.$$ file tmp test dir for archiving. (VPP-1011)

Change-Id: I4baf89ef383dbc2f309081a6b56b13ebcb8fc2df
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit e2efd12b84)
This commit is contained in:
Dave Wallace
2017-09-30 22:04:21 -04:00
committed by Florin Coras
parent 4ca58265a0
commit 86c0446e28
2 changed files with 13 additions and 7 deletions

View File

@ -126,7 +126,7 @@ class KeepAliveReporter(object):
if not desc:
desc = str(test)
self.pipe.send((desc, test.vpp_bin, test.tempdir))
self.pipe.send((desc, test.vpp_bin, test.tempdir, test.vpp.pid))
class VppTestCase(unittest.TestCase):
@ -205,10 +205,10 @@ class VppTestCase(unittest.TestCase):
except:
pass
if coredump_size is None:
coredump_size = "full-coredump"
coredump_size = "coredump-size unlimited"
cls.vpp_cmdline = [cls.vpp_bin, "unix",
"{", "nodaemon", debug_cli, coredump_size, "}",
"api-trace", "{", "on", "}",
"{", "nodaemon", debug_cli, "full-coredump",
coredump_size, "}", "api-trace", "{", "on", "}",
"api-segment", "{", "prefix", cls.shm_prefix, "}",
"plugins", "{", "plugin", "dpdk_plugin.so", "{",
"disable", "}", "}"]
@ -295,11 +295,11 @@ class VppTestCase(unittest.TestCase):
cls.registry = VppObjectRegistry()
cls.vpp_startup_failed = False
cls.reporter = KeepAliveReporter()
cls.reporter.send_keep_alive(cls)
# need to catch exceptions here because if we raise, then the cleanup
# doesn't get called and we might end with a zombie vpp
try:
cls.run_vpp()
cls.reporter.send_keep_alive(cls)
cls.vpp_stdout_deque = deque()
cls.vpp_stderr_deque = deque()
cls.pump_thread_stop_flag = Event()