mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-27 12:04:24 +00:00
zdtm.py: Print out file if it exists
Sometimes tests fail before generating .out file, so print its contents only if it exists. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
b84642ff33
commit
edc19f139c
1 changed files with 4 additions and 3 deletions
|
|
@ -265,9 +265,10 @@ class zdtm_test:
|
|||
os.unlink(self.__pidfile())
|
||||
|
||||
def print_output(self):
|
||||
print "Test output: " + "=" * 32
|
||||
print open(self.__name + '.out').read()
|
||||
print " <<< " + "=" * 32
|
||||
if os.access(self.__name + '.out', os.R_OK):
|
||||
print "Test output: " + "=" * 32
|
||||
print open(self.__name + '.out').read()
|
||||
print " <<< " + "=" * 32
|
||||
|
||||
|
||||
test_classes = { 'zdtm': zdtm_test }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue