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

Unified Diff: client/virt/aexpect.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tools/scan_results.py ('k') | client/virt/common.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/virt/aexpect.py
diff --git a/client/tests/kvm/kvm_subprocess.py b/client/virt/aexpect.py
old mode 100755
new mode 100644
similarity index 99%
rename from client/tests/kvm/kvm_subprocess.py
rename to client/virt/aexpect.py
index 0b8734f7b247c693aac04305d1fb71ab2dba0084..223305d3fe018ad0ca690a224a521783f3128839
--- a/client/tests/kvm/kvm_subprocess.py
+++ b/client/virt/aexpect.py
@@ -186,7 +186,7 @@ if __name__ == "__main__":
# The following is the client part of the module.
import subprocess, time, signal, re, threading, logging
-import common, kvm_utils
+import virt_utils
class ExpectError(Exception):
@@ -385,7 +385,7 @@ class Spawn:
@param linesep: Line separator to be appended to strings sent to the
child process by sendline().
"""
- self.id = id or kvm_utils.generate_random_string(8)
+ self.id = id or virt_utils.generate_random_string(8)
# Define filenames for communication with server
base_dir = "/tmp/kvm_spawn"
@@ -577,7 +577,7 @@ class Spawn:
"""
# Kill it if it's alive
if self.is_alive():
- kvm_utils.kill_process_tree(self.get_pid(), sig)
+ virt_utils.kill_process_tree(self.get_pid(), sig)
# Wait for the server to exit
_wait(self.lock_server_running_filename)
# Call all cleanup routines
@@ -991,7 +991,7 @@ class Expect(Tail):
return match, o
# Check if the child has terminated
- if kvm_utils.wait_for(lambda: not self.is_alive(), 5, 0, 0.1):
+ if virt_utils.wait_for(lambda: not self.is_alive(), 5, 0, 0.1):
raise ExpectProcessTerminatedError(patterns, self.get_status(), o)
else:
# This shouldn't happen
« no previous file with comments | « client/tools/scan_results.py ('k') | client/virt/common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698