diff mbox

KVM test: Unittest subtest: Avoid leak of extra_params

Message ID 1280843063-3998-1-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Aug. 3, 2010, 1:44 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/unittest.py b/client/tests/kvm/tests/unittest.py
index ad95720..c52637a 100644
--- a/client/tests/kvm/tests/unittest.py
+++ b/client/tests/kvm/tests/unittest.py
@@ -46,6 +46,8 @@  def run_unittest(test, params, env):
 
     timeout = int(params.get('unittest_timeout', 600))
 
+    extra_params_original = params['extra_params']
+
     for t in test_list:
         logging.info('Running %s', t)
 
@@ -111,5 +113,8 @@  def run_unittest(test, params, env):
             except NameError, IOError:
                logging.error("Not possible to collect logs")
 
+        # Restore the extra params so other tests can run normally
+        params['extra_params'] = extra_params_original
+
     if nfail != 0:
         raise error.TestFail("Unit tests failed: %s" % " ".join(tests_failed))