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

Side by Side Diff: client/tests/kvm/kvm.py

Issue 6883035: Merge remote branch 'autotest-upstream/master' into autotest-merge (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 import os, logging, imp 1 import os, logging, imp
2 from autotest_lib.client.bin import test 2 from autotest_lib.client.bin import test
3 from autotest_lib.client.common_lib import error 3 from autotest_lib.client.common_lib import error
4 import kvm_utils, kvm_preprocessing 4 import kvm_utils, kvm_preprocessing
5 5
6 6
7 class kvm(test.test): 7 class kvm(test.test):
8 """ 8 """
9 Suite of KVM virtualization functional tests. 9 Suite of KVM virtualization functional tests.
10 Contains tests for testing both KVM kernel code and userspace code. 10 Contains tests for testing both KVM kernel code and userspace code.
11 11
12 @copyright: Red Hat 2008-2009 12 @copyright: Red Hat 2008-2009
13 @author: Uri Lublin (uril@redhat.com) 13 @author: Uri Lublin (uril@redhat.com)
14 @author: Dror Russo (drusso@redhat.com) 14 @author: Dror Russo (drusso@redhat.com)
15 @author: Michael Goldish (mgoldish@redhat.com) 15 @author: Michael Goldish (mgoldish@redhat.com)
16 @author: David Huff (dhuff@redhat.com) 16 @author: David Huff (dhuff@redhat.com)
17 @author: Alexey Eromenko (aeromenk@redhat.com) 17 @author: Alexey Eromenko (aeromenk@redhat.com)
18 @author: Mike Burns (mburns@redhat.com) 18 @author: Mike Burns (mburns@redhat.com)
19 19
20 @see: http://www.linux-kvm.org/page/KVM-Autotest/Client_Install 20 @see: http://www.linux-kvm.org/page/KVM-Autotest/Client_Install
21 (Online doc - Getting started with KVM testing) 21 (Online doc - Getting started with KVM testing)
22 """ 22 """
23 version = 1 23 version = 1
24 env_version = 1 24 env_version = 1
25 25
26 def run_once(self, params): 26 def run_once(self, params):
27 # Convert params to a Params object 27 # Convert params to a Params object
28 params = kvm_utils.Params(params) 28 params = kvm_utils.Params(params)
29 29
30 # If a dependency test prior to this test has failed, let's fail
31 # it right away as TestNA.
32 if params.get("dependency_failed") == 'yes':
33 raise error.TestNAError("Test dependency failed")
34
30 # Report the parameters we've received and write them as keyvals 35 # Report the parameters we've received and write them as keyvals
31 logging.debug("Test parameters:") 36 logging.debug("Test parameters:")
32 keys = params.keys() 37 keys = params.keys()
33 keys.sort() 38 keys.sort()
34 for key in keys: 39 for key in keys:
35 logging.debug(" %s = %s", key, params[key]) 40 logging.debug(" %s = %s", key, params[key])
36 self.write_test_keyval({key: params[key]}) 41 self.write_test_keyval({key: params[key]})
37 42
38 # Set the log file dir for the logging mechanism used by kvm_subprocess 43 # Set the log file dir for the logging mechanism used by kvm_subprocess
39 # (this must be done before unpickling env) 44 # (this must be done before unpickling env)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 for vm in env.get_all_vms(): 113 for vm in env.get_all_vms():
109 if vm.is_dead(): 114 if vm.is_dead():
110 continue 115 continue
111 logging.info("VM '%s' is alive.", vm.name) 116 logging.info("VM '%s' is alive.", vm.name)
112 for m in vm.monitors: 117 for m in vm.monitors:
113 logging.info("'%s' has a %s monitor unix socket at: %s", 118 logging.info("'%s' has a %s monitor unix socket at: %s",
114 vm.name, m.protocol, m.filename) 119 vm.name, m.protocol, m.filename)
115 logging.info("The command line used to start '%s' was:\n%s", 120 logging.info("The command line used to start '%s' was:\n%s",
116 vm.name, vm.make_qemu_command()) 121 vm.name, vm.make_qemu_command())
117 raise error.JobError("Abort requested (%s)" % e) 122 raise error.JobError("Abort requested (%s)" % e)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698