mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-21 21:18:54 +00:00
tests: deleting when tests failed
We only dumped test results for debugging, when tests failed. we should also delete them for avoiding leaving stale test results under /tmp. Fixes: #442 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
This commit is contained in:
parent
891b61c993
commit
c29dbae5b2
@ -177,6 +177,7 @@ exit_handler()
|
||||
if [ -d "${tmp_rootfs}" ]; then
|
||||
info "rootfs:"
|
||||
sudo -E ls -l "${tmp_rootfs}" >&2
|
||||
sudo -E rm -rf "${tmp_rootfs}"
|
||||
else
|
||||
info "no rootfs created"
|
||||
# If no rootfs are created, no need to dump other info
|
||||
@ -186,6 +187,7 @@ exit_handler()
|
||||
if [ -d "${images_dir}" ]; then
|
||||
info "images:"
|
||||
sudo -E ls -l "${images_dir}" >&2
|
||||
sudo -E rm -rf "${images_dir}"
|
||||
else
|
||||
info "no images created"
|
||||
# If no images are created, no need to dump other info
|
||||
|
Loading…
Reference in New Issue
Block a user