From: Michael Goldish Subject: [KVM-AUTOTEST PATCH 4/5] KVM test: make kvm_stat usage optional Date: Mon, 22 Mar 2010 04:43:16 +0200 Message-ID: <1269225797-11827-4-git-send-email-mgoldish@redhat.com> References: <1269225797-11827-1-git-send-email-mgoldish@redhat.com> <1269225797-11827-2-git-send-email-mgoldish@redhat.com> <1269225797-11827-3-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: <1269225797-11827-3-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 Relying on the test tag is not cool. Use a dedicated parameter instead. By default, all tests except build tests will use kvm_stat. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_utils.py | 8 ++++---- client/tests/kvm/tests_base.cfg.sample | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index cc39b5d..5834539 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -845,8 +845,8 @@ def run_tests(test_list, job): @return: True, if all tests ran passed, False if any of them failed. """ status_dict = {} - failed = False + for dict in test_list: if dict.get("skip") == "yes": continue @@ -863,12 +863,12 @@ def run_tests(test_list, job): 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: + if dict.get("run_kvm_stat") == "yes": + profile = True + else: # 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') diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample index 9963a44..b13aec4 100644 --- a/client/tests/kvm/tests_base.cfg.sample +++ b/client/tests/kvm/tests_base.cfg.sample @@ -40,6 +40,9 @@ nic_mode = user nic_script = scripts/qemu-ifup address_index = 0 +# Misc +run_kvm_stat = yes + # Tests variants: -- 1.5.4.1