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 |