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

Side by Side Diff: client/virt/tests/boot.py

Issue 6883246: Merge autotest upstream from @5318 ~ @5336 (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 7 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
« no previous file with comments | « client/virt/tests/autotest.py ('k') | client/virt/tests/clock_getres.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import time 1 import time
2 2
3 3
4 def run_boot(test, params, env): 4 def run_boot(test, params, env):
5 """ 5 """
6 KVM reboot test: 6 KVM reboot test:
7 1) Log into a guest 7 1) Log into a guest
8 2) Send a reboot command or a system_reset monitor command (optional) 8 2) Send a reboot command or a system_reset monitor command (optional)
9 3) Wait until the guest is up again 9 3) Wait until the guest is up again
10 4) Log into the guest to verify it's up again 10 4) Log into the guest to verify it's up again
11 11
12 @param test: kvm test object 12 @param test: kvm test object
13 @param params: Dictionary with the test parameters 13 @param params: Dictionary with the test parameters
14 @param env: Dictionary with test environment. 14 @param env: Dictionary with test environment.
15 """ 15 """
16 vm = env.get_vm(params["main_vm"]) 16 vm = env.get_vm(params["main_vm"])
17 vm.verify_alive() 17 vm.verify_alive()
18 timeout = float(params.get("login_timeout", 240)) 18 timeout = float(params.get("login_timeout", 240))
19 session = vm.wait_for_login(timeout=timeout) 19 session = vm.wait_for_login(timeout=timeout)
20 20
21 if params.get("reboot_method"): 21 if params.get("reboot_method"):
22 if params["reboot_method"] == "system_reset": 22 if params["reboot_method"] == "system_reset":
23 time.sleep(int(params.get("sleep_before_reset", 10))) 23 time.sleep(int(params.get("sleep_before_reset", 10)))
24 session = vm.reboot(session, params["reboot_method"], 0, timeout) 24 session = vm.reboot(session, params["reboot_method"], 0, timeout)
25 25
26 session.close() 26 session.close()
OLDNEW
« no previous file with comments | « client/virt/tests/autotest.py ('k') | client/virt/tests/clock_getres.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698