From patchwork Sun Jan 10 00:13:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 71964 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0A0DDO9006741 for ; Sun, 10 Jan 2010 00:13:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753349Ab0AJANM (ORCPT ); Sat, 9 Jan 2010 19:13:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752911Ab0AJANL (ORCPT ); Sat, 9 Jan 2010 19:13:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39333 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178Ab0AJANL (ORCPT ); Sat, 9 Jan 2010 19:13:11 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0A0D9i6013165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 9 Jan 2010 19:13:09 -0500 Received: from localhost.localdomain (vpn-11-228.rdu.redhat.com [10.11.11.228]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0A0D5HU020792; Sat, 9 Jan 2010 19:13:08 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] KVM test utils: Add kvm_stat profiling to run_tests Date: Sat, 9 Jan 2010 22:13:03 -0200 Message-Id: <1263082383-3703-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 2bbbe22..7152816 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -902,9 +902,26 @@ def run_tests(test_list, job): break if dependencies_satisfied: test_iterations = int(dict.get("iterations", 1)) - current_status = job.run_test("kvm", params=dict, - tag=dict.get("shortname"), - iterations=test_iterations) + test_tag = dict.get("shortname") + # Setting up kvm_stat profiling during test execution. + # We don't need kvm_stat profiling on the build tests. + if "build" in test_tag: + # None because it's the default value on the base_test class + # and the value None is specifically checked there. + profile = None + else: + profile = True + + if profile: + job.profilers.add('kvm_stat') + # We need only one execution, profiled, hence we're passing + # the profile_only parameter to job.run_test(). + current_status = job.run_test("kvm", params=dict, tag=test_tag, + iterations=test_iterations, + profile_only=profile) + if profile: + job.profilers.delete('kvm_stat') + if not current_status: failed = True else: