summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-05-11 08:40:17 +0200
committerThomas Haller <thaller@redhat.com>2023-05-12 12:42:54 +0200
commit751ee63e61535bceda86886e6f1bce40059c33e5 (patch)
tree263151e93093aeaa42f121ce859ef72d565014d8
parentcb51aee21cb06488a410fe0a380504fd7615d4ad (diff)
downloadNetworkManager-751ee63e61535bceda86886e6f1bce40059c33e5.tar.gz
test-client: cleanup after test on failure
Otherwise, the following tests will fail too.
-rwxr-xr-xsrc/tests/client/test-client.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tests/client/test-client.py b/src/tests/client/test-client.py
index e33317b1a9..dd13c186d6 100755
--- a/src/tests/client/test-client.py
+++ b/src/tests/client/test-client.py
@@ -2175,14 +2175,22 @@ class TestNmCloudSetup(TestNmClient):
self.md_url = "http://%s:%d" % s.getsockname()
s.close()
+ error = None
+
self.srv_start()
- func(self)
+ try:
+ func(self)
+ except Exception as e:
+ error = e
self._nm_test_post()
p.stdin.close()
p.terminate()
p.wait()
+ if error:
+ raise error
+
return f
@cloud_setup_test