Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: client/tests/kvm/kvm.py

Issue 6124004: Revert "Merge remote branch 'cros/upstream' into autotest-rebase" (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/kvm/installer.py ('k') | client/tests/kvm/kvm_preprocessing.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/kvm.py
diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
index dbe29c3769385a29eccaf71e36f9c1cbff879f57..f65623860cdc8100e04e461e43cc0459626e8ea7 100644
--- a/client/tests/kvm/kvm.py
+++ b/client/tests/kvm/kvm.py
@@ -21,12 +21,9 @@ class kvm(test.test):
(Online doc - Getting started with KVM testing)
"""
version = 1
- env_version = 1
+ env_version = 0
def run_once(self, params):
- # Convert params to a Params object
- params = kvm_utils.Params(params)
-
# Report the parameters we've received and write them as keyvals
logging.debug("Test parameters:")
keys = params.keys()
@@ -43,7 +40,8 @@ class kvm(test.test):
logging.info("Unpickling env. You may see some harmless error "
"messages.")
env_filename = os.path.join(self.bindir, params.get("env", "env"))
- env = kvm_utils.Env(env_filename, self.env_version)
+ env = kvm_utils.load_env(env_filename, self.env_version)
+ logging.debug("Contents of environment: %s", env)
test_passed = False
@@ -68,13 +66,13 @@ class kvm(test.test):
try:
kvm_preprocessing.preprocess(self, params, env)
finally:
- env.save()
+ kvm_utils.dump_env(env, env_filename)
# Run the test function
run_func = getattr(test_module, "run_%s" % t_type)
try:
run_func(self, params, env)
finally:
- env.save()
+ kvm_utils.dump_env(env, env_filename)
test_passed = True
except Exception, e:
@@ -84,7 +82,7 @@ class kvm(test.test):
kvm_preprocessing.postprocess_on_error(
self, params, env)
finally:
- env.save()
+ kvm_utils.dump_env(env, env_filename)
raise
finally:
@@ -98,14 +96,15 @@ class kvm(test.test):
logging.error("Exception raised during "
"postprocessing: %s", e)
finally:
- env.save()
+ kvm_utils.dump_env(env, env_filename)
+ logging.debug("Contents of environment: %s", env)
except Exception, e:
if params.get("abort_on_error") != "yes":
raise
# Abort on error
logging.info("Aborting job (%s)", e)
- for vm in env.get_all_vms():
+ for vm in kvm_utils.env_get_all_vms(env):
if vm.is_dead():
continue
logging.info("VM '%s' is alive.", vm.name)
« no previous file with comments | « client/tests/kvm/installer.py ('k') | client/tests/kvm/kvm_preprocessing.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698