Commit bfb98244 authored by Pavel Emelyanov's avatar Pavel Emelyanov

zdtm.py: Print out and strace file names

Generated files are often analyzed after test, so it's handy to have
their full names on the screen at once.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
parent dc3b525c
......@@ -590,7 +590,9 @@ class criu_cli:
strace = []
if self.__sat:
strace = ["strace", "-o", os.path.join(self.__ddir(), action + '.strace'), '-T']
fname = os.path.join(self.__ddir(), action + '.strace')
print_fname(fname, 'strace')
strace = ["strace", "-o", fname, '-T']
if action == 'restore':
strace += [ '-f' ]
s_args += [ '--action-script', os.getcwd() + '/../scripts/fake-restore.sh' ]
......@@ -906,6 +908,10 @@ def self_checkskip(tname):
return False
def print_fname(fname, typ):
print "=[%s]=> %s" % (typ, fname)
def print_sep(title, sep = "=", width = 80):
print (" " + title + " ").center(width, sep)
......@@ -914,6 +920,7 @@ def grep_errors(fname):
for l in open(fname):
if "Error" in l:
if first:
print_fname(fname, 'log')
print_sep("grep Error", "-", 60)
first = False
print l,
......
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