This is the sequel of the previous fix on the unittest
subtest: As we're running on a loop through the
unittest list, the original extra_params need to be
restored at the end of each test, so previously
set extra_params don't leak to other unittests.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/tests/kvm/tests/unittest.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

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))
-- 
1.7.1.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to