diff mbox

[KVM-AUTOTEST,7/7,RFC] KVM test: use error.context() in kvm_preprocessing.py

Message ID 1294079651-21631-7-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish Jan. 3, 2011, 6:34 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index 5ce0a3b..b7f3154 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -49,7 +49,8 @@  def preprocess_vm(test, params, env, name):
     @param env: The environment (a dict-like object).
     @param name: The name of the VM object.
     """
-    logging.debug("Preprocessing VM '%s'..." % name)
+    error.context("preprocessing '%s'" % name)
+
     vm = env.get_vm(name)
     if vm:
         logging.debug("VM object found in environment")
@@ -114,7 +115,7 @@  def postprocess_vm(test, params, env, name):
     @param env: The environment (a dict-like object).
     @param name: The name of the VM object.
     """
-    logging.debug("Postprocessing VM '%s'..." % name)
+    error.context("postprocessing '%s'" % name)
     vm = env.get_vm(name)
     if vm:
         logging.debug("VM object found in environment")
@@ -196,6 +197,8 @@  def preprocess(test, params, env):
     @param params: A dict containing all VM and image parameters.
     @param env: The environment (a dict-like object).
     """
+    error.context("preprocessing")
+
     # Start tcpdump if it isn't already running
     if "address_cache" not in env:
         env["address_cache"] = {}
@@ -282,6 +285,8 @@  def postprocess(test, params, env):
     @param params: Dict containing all VM and image parameters.
     @param env: The environment (a dict-like object).
     """
+    error.context("postprocessing")
+
     # Postprocess all VMs and images
     process(test, params, env, postprocess_image, postprocess_vm)