Commit ed8a13b7 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm: show error messages in a error case

Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2f481f02
...@@ -305,6 +305,7 @@ class criu_cli: ...@@ -305,6 +305,7 @@ class criu_cli:
print "Run CRIU: [" + action + " " + " ".join(s_args) + "]" print "Run CRIU: [" + action + " " + " ".join(s_args) + "]"
ret = self.__criu(action, s_args) ret = self.__criu(action, s_args)
if ret != 0: if ret != 0:
grep_errors(os.path.join(self.__ddir(), log))
raise test_fail_exc("CRIU %s" % action) raise test_fail_exc("CRIU %s" % action)
def __criu_cr(self, action, opts): def __criu_cr(self, action, opts):
...@@ -518,6 +519,17 @@ def self_checkskip(tname): ...@@ -518,6 +519,17 @@ def self_checkskip(tname):
return False return False
def print_sep(title, sep = "="):
sep_len = (80 - len(title) - 2) / 2
sep = sep * sep_len
print "%s %s %s" % (sep, title, sep)
def grep_errors(fname):
print_sep("grep Error")
for l in open(fname):
if "Error" in l:
print l,
print_sep("ERROR OVER")
def run_tests(opts): def run_tests(opts):
excl = None excl = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment