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

Toshifumi Fujimura fujimura.toshifumi at np.css.fujitsu.com
Thu Oct 30 02:44:12 UTC 2008


# HG changeset patch
# User Toshifumi Fujimura<fujimura.toshifumi at np.css.fujitsu.com>
# Date 1225334079 -32400
# Node ID f3d6047cfe923377c63b50fa65bf41e847c82ed1
# Parent  408dbb3a61b43bd0def587a9ea7e648105def002
[PATCH][TEST]#3 Add the revision and the changeset of Cimtest to the 
test report
I fixed something to be pointed out.

Signed-off-by: Toshifumi Fujimura <fujimura.toshifumi at np.css.fujitsu.com>

diff -r 408dbb3a61b4 -r f3d6047cfe92 
suites/libvirt-cim/lib/XenKvmLib/reporting.py
--- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py    Mon Oct 27 
20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py    Thu Oct 30 
11:34:39 2008 +0900
@@ -32,6 +32,13 @@
         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"
@@ -76,15 +83,19 @@
 
     cimom, cimom_ver = get_cimom_ver(ip)
 
-    env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: 
%s %s\n"\
+    env = "Distro: %s\nKernel: %s\nlibvirt: %s\
+          \nHypervisor: %s\nCIMOM: %s %s\n"\
           % (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