diff options
Diffstat (limited to 'test/hook.py')
-rw-r--r-- | test/hook.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/hook.py b/test/hook.py index 49b41c91dff..f4bafa16f19 100644 --- a/test/hook.py +++ b/test/hook.py @@ -4,6 +4,7 @@ import sys import traceback from log import RED, single_line_delim, double_line_delim from debug import spawn_gdb +from subprocess import check_output, CalledProcessError class Hook(object): @@ -67,8 +68,17 @@ class PollHook(Hook): open('%s/_core_handled' % self.testcase.tempdir, 'a').close() spawn_gdb(self.testcase.vpp_bin, core_path, self.logger) else: - self.logger.critical("Core file present, debug with: gdb %s %s" % - (self.testcase.vpp_bin, core_path)) + self.logger.error("Core file present, debug with: gdb %s %s" % + (self.testcase.vpp_bin, core_path)) + self.logger.error("Running `file %s':" % core_path) + try: + info = check_output(["file", core_path]) + self.logger.error(info) + except CalledProcessError as e: + self.logger.error( + "Could not run `file' utility on core-file, " + "rc=%s" % e.returncode) + pass def poll_vpp(self): """ |