Always try to clean up all virtual machines and networks
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Mon, 23 Apr 2018 11:40:04 +0000 (13:40 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Mon, 23 Apr 2018 11:40:04 +0000 (13:40 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
test.py

diff --git a/test.py b/test.py
index 2e2f13a..271e809 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -633,6 +633,11 @@ if __name__ == "__main__":
     currenttest.read_settings()
     currenttest.virtual_environ_setup()
     currenttest.load_recipe()
-    currenttest.virtual_environ_start()
-    currenttest.run_recipe()
-    currenttest.virtual_environ_stop()
\ No newline at end of file
+    try:
+        currenttest.virtual_environ_start()
+        currenttest.run_recipe()
+    except BaseException as e:
+        print(e)
+    finally:
+        currenttest.virtual_environ_stop()
+