
Thanks so much for submitting a patch! =) I'm glad you got libvirt-cim and cimtest setup and running. Just a few minor changes..
+ +def get_cimtest_revision(): + revision = commands.getoutput("hg parents --template \"{rev}\"") + return revision + +def get_cimtest_changeset(): + changeset = commands.getoutput("hg parents --template \"{node|short}\"") + return changeset
If you check out the directory with user x, but then run "hg parents --template \"{rev}\"" from that directory as user y, you'll see something like the follwoing: [root@elm3b41 cimtest]# hg parents --template \"{rev}\"Not trusting file /tmp/cimtest/.hg/hgrc from untrusted user kaitlin, group cim Not trusting file /tmp/cimtest/.hg/hgrc from untrusted user kaitlin, group cim "459" Can you strip out everything but the revision number and changeset number?
def get_cmd_val(cmd, ip): rc, out = utils.run_remote(ip, cmd) @@ -137,6 +145,10 @@
cimom, cimom_ver = get_cimom_ver(ip)
+ cimtest_revision = get_cimtest_revision() + cimtest_changeset = get_cimtest_changeset() + cimtest_info = "Cimtest revision: %s\nCimtest changeset: %s\n" % (cimtest_revision, cimtest_changeset) +
This line wraps over 80 characters. Can you split it into 2 lines? Also, this block of code can be moved to the get_env_data() function. get_env_data() builds the header block for the test run.
heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) sys_env = get_env_data(ip, virt)
@@ -146,7 +158,7 @@
res, res_total, test_block = build_report_body(rvals, tstr, divider)
- report = divider + heading + "\n" + divider + sys_env + divider + res \ + report = divider + heading + "\n" + divider + sys_env + cimtest_info + divider + res \
So this can also be moved to get_env_data() - you can add cimtest_info to the return statement. Thanks again - this looks great! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com