[dts] [PATCH 4/5] Add session close function in virt_dut module.
Yong Liu
yong.liu at intel.com
Thu Jun 4 08:28:38 CEST 2015
From: Marvin Liu <yong.liu at intel.com>
Signed-off-by: Marvin Liu <yong.liu at intel.com>
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
More information about the dts
mailing list