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 AA203C32C for ; Thu, 4 Jun 2015 08:29:00 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 03 Jun 2015 23:28:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,551,1427785200"; d="scan'208";a="502536625" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jun 2015 23:28:58 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t546Stsa018343; Thu, 4 Jun 2015 14:28:55 +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 t546SrWQ002378; Thu, 4 Jun 2015 14:28:55 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t546SrCq002374; Thu, 4 Jun 2015 14:28:53 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 4 Jun 2015 14:28:38 +0800 Message-Id: <1433399319-2314-5-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1433399319-2314-1-git-send-email-yong.liu@intel.com> References: <1433399319-2314-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 4/5] Add session close function in virt_dut module. 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: Thu, 04 Jun 2015 06:29:01 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/virt_dut.py b/framework/virt_dut.py index b087220..b52109d 100644 --- a/framework/virt_dut.py +++ b/framework/virt_dut.py @@ -79,6 +79,12 @@ class VirtDut(DPDKdut): self.ports_map = [] self.virttype = virttype + def close_sessions(self): + if self.session: + self.session.close() + if self.alt_session: + self.alt_session.close() + def set_nic_type(self, nic_type): """ Set CRB NICS ready to validated. @@ -122,12 +128,16 @@ class VirtDut(DPDKdut): Then call pci scan function to collect nic device information. At last setup DUT' environment for validation. """ - self.prepare_package(pkgName, patch) + if not self.skip_setup: + self.prepare_package(pkgName, patch) self.send_expect("cd %s" % self.base_dir, "# ") - self.host_session.send_expect("cd %s" % self.base_dir, "# ") self.send_expect("alias ls='ls --color=none'", "#") + if self.get_os_type() == 'freebsd': + self.send_expect('alias make=gmake', '# ') + self.send_expect('alias sed=gsed', '# ') + self.init_core_list() self.pci_devices_information() -- 1.9.3