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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mgoldish@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux