summaryrefslogtreecommitdiffstats
path: root/test/hook.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-03-23 10:50:11 +0100
committerDave Wallace <dwallacelf@gmail.com>2018-03-24 15:17:30 +0000
commit9b6ece79521a4628fc4116378862db1bdb77be49 (patch)
tree3068f885eda9e9434ef97e802395014a66b781a2 /test/hook.py
parentf0d0ddbff287f06441f7256fd50181f9f2194d49 (diff)
make test: enhance core-file information
Change-Id: I1283960a9a49f6d70b9d7b7793cfb345c22ccdea Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/hook.py')
-rw-r--r--test/hook.py14
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):
"""