# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1229927143 28800
# Node ID 20e454e532d1cceed071444c0fb05e58ccc5757c
# Parent bac8c62509fa9e94ba8983826ed300b4f946b65f
[TEST] Fixing main.py with workaround to verify if qemu and qemu-kvm on F10 machines.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r bac8c62509fa -r 20e454e532d1 suites/libvirt-cim/main.py
--- a/suites/libvirt-cim/main.py Thu Dec 18 00:51:43 2008 -0800
+++ b/suites/libvirt-cim/main.py Sun Dec 21 22:25:43 2008 -0800
@@ -99,7 +99,18 @@
cmd = "virsh -c %s version" % virt2uri(virt)
ret, out = utils.run_remote(ip, cmd)
if ret != 0:
- return "Encountered an error querying libvirt with: %s" % cmd
+ # The above version cmd does not work for F10.
+ # Hence, this is a workaround to verify if qemu and qemu-kvm
+ # are installed in case the above version cmd fails.
+ cmd = "qemu -help"
+ ret, out = utils.run_remote(ip, qemu_cmd)
+ if ret != 0:
+ return "Encountered an error querying for qemu"
+
+ cmd = "qemu-kvm -help"
+ ret, out = utils.run_remote(ip, qemu_kvm_cmd)
+ if ret != 0:
+ return "Encountered an error querying for qemu-kvm "
cmd = "ps -ef | grep -v grep | grep cimserver"
rc, out = utils.run_remote(ip, cmd)