From patchwork Fri Aug 26 20:06:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 1103042 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7QK7CDb027457 for ; Fri, 26 Aug 2011 20:07:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753864Ab1HZUHL (ORCPT ); Fri, 26 Aug 2011 16:07:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42788 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753747Ab1HZUHK (ORCPT ); Fri, 26 Aug 2011 16:07:10 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7QK79pZ032213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Aug 2011 16:07:09 -0400 Received: from freedom.local.com (vpn-10-208.rdu.redhat.com [10.11.10.208]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7QK77NW007451; Fri, 26 Aug 2011 16:07:08 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] virt.virt_env_process: Take screenshots pre/post test only when required Date: Fri, 26 Aug 2011 17:06:57 -0300 Message-Id: <1314389217-31026-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 26 Aug 2011 20:07:13 +0000 (UTC) This patch makes the env processor code that takes a VM screenshot pre/post a test runs depending on the value of the take_regular_screendumps config variable. Usually, we either want all screenshots or none of them. Signed-off-by: Lucas Meneghel Rodrigues --- client/virt/virt_env_process.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/virt/virt_env_process.py b/client/virt/virt_env_process.py index 8ef6497..8ab9e3d 100644 --- a/client/virt/virt_env_process.py +++ b/client/virt/virt_env_process.py @@ -86,7 +86,7 @@ def preprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name) try: - if vm.monitor: + if vm.monitor and params.get("take_regular_screendumps") == "yes": vm.monitor.screendump(scrdump_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e) @@ -122,7 +122,7 @@ def postprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "post_%s.ppm" % name) try: - if vm.monitor: + if vm.monitor and params.get("take_regular_screenshots") == "yes": vm.monitor.screendump(scrdump_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e)