diff options
author | Jhon Honce <jhonce@redhat.com> | 2018-10-25 12:20:11 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2018-10-25 12:20:11 -0700 |
commit | d62fa127a18a681ca85f119a2105093329edfaad (patch) | |
tree | a9eb817d862cf6b943dc5315fffb9d17655f26c0 /contrib/python/podman/test/test_runner.sh | |
parent | 3efa0685289a44ab21015897253565b9c50c1777 (diff) | |
download | podman-d62fa127a18a681ca85f119a2105093329edfaad.tar.gz podman-d62fa127a18a681ca85f119a2105093329edfaad.tar.bz2 podman-d62fa127a18a681ca85f119a2105093329edfaad.zip |
Ensure test container in running state
* Save storage if tests fail
Fixes #1643
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'contrib/python/podman/test/test_runner.sh')
-rwxr-xr-x | contrib/python/podman/test/test_runner.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/python/podman/test/test_runner.sh b/contrib/python/podman/test/test_runner.sh index 65cbd1e9c..bf097e2b2 100755 --- a/contrib/python/podman/test/test_runner.sh +++ b/contrib/python/podman/test/test_runner.sh @@ -31,7 +31,9 @@ function cleanup { # aggressive cleanup as tests may crash leaving crap around umount '^(shm|nsfs)' umount '\/run\/netns' - rm -r "$1" + if [[ $RETURNCODE -eq 0 ]]; then + rm -r "$1" + fi } # Create temporary directory for storage |