diff mbox

[KVM-AUTOTEST,4/5] KVM test: make kvm_stat usage optional

Message ID 1269225797-11827-4-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish March 22, 2010, 2:43 a.m. UTC
None
diff mbox

Patch

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: