From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A0972C3BA for ; Mon, 6 Jul 2015 07:49:16 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 05 Jul 2015 22:49:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,413,1432623600"; d="scan'208";a="758978869" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 05 Jul 2015 22:49:14 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t665nD8e030028; Mon, 6 Jul 2015 13:49:13 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t665nAkr002705; Mon, 6 Jul 2015 13:49:12 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t665nALZ002701; Mon, 6 Jul 2015 13:49:10 +0800 From: Yong Liu To: dts@dpdk.org Date: Mon, 6 Jul 2015 13:49:09 +0800 Message-Id: <1436161749-2669-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1436161213-2025-1-git-send-email-yong.liu@intel.com> References: <1436161213-2025-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH] Add qemu option support in virtualization framework X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 05:49:17 -0000 From: Marvin Liu This option support manually configure qemu emulator path. Remove unused debug code. Signed-off-by: Marvin Liu diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index 20a1df4..c04b61f 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -151,19 +151,25 @@ 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 + """ + if 'path' in options.keys(): + self.set_qemu_emulator(options['path']) def has_virtual_ability(self): """ -- 1.9.3