From: Yong Liu <yong.liu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH] Add qemu option support in virtualization framework
Date: Mon, 6 Jul 2015 13:40:13 +0800 [thread overview]
Message-ID: <1436161213-2025-1-git-send-email-yong.liu@intel.com> (raw)
From: Marvin Liu <yong.liu@intel.com>
This option support manually configure qemu emulator path.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index 20a1df4..b305814 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -151,19 +151,27 @@ class QEMUKvm(VirtBase):
"""
Set the qemu emulator in the specified path explicitly.
"""
- qemu_emulator_path = str(qemu_emulator_path)
out = self.host_session.send_expect(
- 'ls %s' % qemu_emulator_path, '[.*')
+ 'ls %s' % qemu_emulator_path, '# ')
if 'No such file or directory' in out:
self.host_logger.error("No emulator [ %s ] on the DUT [ %s ]" %
- (qemu_emulator, self.host_dut.get_ip_address()))
+ (qemu_emulator_path, self.host_dut.get_ip_address()))
return None
out = self.host_session.send_expect("[ -x %s ];echo $?" % qemu_emulator_path, '# ')
- if out == '1':
+ if out != '0':
self.host_logger.error("Emulator [ %s ] not executable on the DUT [ %s ]" %
- (qemu_emulator, self.host_dut.get_ip_address()))
+ (qemu_emulator_path, self.host_dut.get_ip_address()))
return None
- self.qemu_emulator = qemu_emulator
+ self.qemu_emulator = qemu_emulator_path
+
+ def add_vm_qemu(self, **options):
+ """
+ path: absolute path for qemu emulator
+ """
+ import pdb
+ pdb.set_trace()
+ if 'path' in options.keys():
+ self.set_qemu_emulator(options['path'])
def has_virtual_ability(self):
"""
--
1.9.3
next reply other threads:[~2015-07-06 5:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 5:40 Yong Liu [this message]
2015-07-06 5:49 ` Yong Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436161213-2025-1-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).