[Libvirt-cim] [PATCH][TEST]#2 Add the revision and the changeset of Cimtest to the test report

Toshifumi Fujimura fujimura.toshifumi at np.css.fujitsu.com
Wed Oct 29 08:13:02 UTC 2008


# HG changeset patch
# User Toshifumi Fujimura<fujimura.toshifumi at np.css.fujitsu.com>
# Date 1225266738 -32400
# Node ID 743d9fcc2cc050f8a299bc29a598332baa754d7a
# Parent  0f340004e1cd48f5ede60a68283a850ae60c9ebe
[PATCH][TEST]#2 Add the revision and the changeset of Cimtest to the 
test report
I modify two points.
*strip out everything but the revision number and changeset number
*move Cimtest strings to the get_env_data()

diff -r 0f340004e1cd -r 743d9fcc2cc0 
suites/libvirt-cim/lib/XenKvmLib/reporting.py
--- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py    Fri Oct 24 
01:04:38 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py    Wed Oct 29 
16:52:18 2008 +0900
@@ -32,6 +32,11 @@
         return "Unknown"
     return out
 
+def get_cimtest_version():
+    revision = commands.getoutput("hg parents --template \"{rev}\" 
2>/dev/null")
+    changeset = commands.getoutput("hg parents --template 
\"{node|short}\" 2>/dev/null")
+    return revision, changeset
+
 def get_libvirt_ver(ip):
     libvirt_ver = "Unknown"
     hyp_ver = "Unknown"
@@ -80,11 +85,14 @@
           % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver)
 
     rev, changeset = get_provider_version(virt, ip)
+    cimtest_revision, cimtest_changeset = get_cimtest_version()
 
     lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \
              (rev, changeset)
+    cimtest_ver = "Cimtest revision: %s\nCimtest changeset: %s\n" % \
+                  (cimtest_revision, cimtest_changeset)
 
-    return env + lc_ver
+    return env + lc_ver + cimtest_ver
 
 def parse_run_output(log_file):
     rvals = { 'PASS' : 0,

-- 
Toshifumi Fujimura.





More information about the Libvirt-cim mailing list