From: Michael Goldish Subject: [KVM-AUTOTEST PATCH v3 07/11] KVM test: use error.context() in kvm_preprocessing.py Date: Fri, 7 Jan 2011 20:48:07 +0200 Message-ID: <1294426091-16704-7-git-send-email-mgoldish@redhat.com> References: <1294426091-16704-1-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1294426091-16704-1-git-send-email-mgoldish@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index 5ce0a3b..5a452fa 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -187,6 +187,7 @@ def process(test, params, env, image_func, vm_func): vm_func(test, vm_params, env, vm_name) +@error.context_aware def preprocess(test, params, env): """ Preprocess all VMs and images according to the instructions in params. @@ -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"] = {} @@ -274,6 +277,7 @@ def preprocess(test, params, env): _screendump_thread.start() +@error.context_aware def postprocess(test, params, env): """ Postprocess all VMs and images according to the instructions in params. @@ -282,6 +286,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) -- 1.7.3.4