Commit d5fc5dbb authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

zdtm.py: run --clean hook on test failure

It seems to me most of the clean hooks (used by cgroup*, macvlan* cr_veth*
and mnt_tracefs* were all designed to be run to clean up after the test, no
matter whether it failed or succeeded. Let's always run them, so Andrei
doesn't hate me :D

travis-ci: success for zdtm.py: run --clean hook on test failure
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
CC: Andrei Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent abc8fba6
...@@ -1265,6 +1265,7 @@ def do_run_test(tname, tdesc, flavs, opts): ...@@ -1265,6 +1265,7 @@ def do_run_test(tname, tdesc, flavs, opts):
print_sep("Test %s FAIL at %s" % (tname, e.step), '#') print_sep("Test %s FAIL at %s" % (tname, e.step), '#')
t.print_output() t.print_output()
t.kill() t.kill()
try_run_hook(t, ["--clean"])
if cr_api.logs(): if cr_api.logs():
add_to_report(cr_api.logs(), tname.replace('/', '_') + "_" + f + "/images") add_to_report(cr_api.logs(), tname.replace('/', '_') + "_" + f + "/images")
if opts['keep_img'] == 'never': if opts['keep_img'] == 'never':
......
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