From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 68222C544 for ; Thu, 18 Jun 2015 05:07:03 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 17 Jun 2015 20:07:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,636,1427785200"; d="scan'208";a="745553042" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 17 Jun 2015 20:07:01 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t5I36xKO009070; Thu, 18 Jun 2015 11:06:59 +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 t5I36vnP016917; Thu, 18 Jun 2015 11:06:59 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t5I36vAv016913; Thu, 18 Jun 2015 11:06:57 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 18 Jun 2015 11:06:40 +0800 Message-Id: <1434596804-16846-6-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1434596804-16846-1-git-send-email-yong.liu@intel.com> References: <1434596804-16846-1-git-send-email-yong.liu@intel.com> Subject: [dts] [dts 5/9] Optimize set_target function for virtual scenario 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, 18 Jun 2015 03:07:03 -0000 From: Marvin Liu Add build_only parameter for set_target function, when enable build only, ports on dut will not be bound to igb_uio driver. Signed-off-by: Marvin Liu diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 0b94b99..bc1a9bd 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -53,7 +53,7 @@ class DPDKdut(Dut): super(DPDKdut, self).__init__(crb, serializer) self.testpmd = None - def set_target(self, target): + def set_target(self, target, build_only=False): """ Set env variable, these have to be setup all the time. Some tests need to compile example apps by themselves and will fail otherwise. @@ -76,7 +76,7 @@ class DPDKdut(Dut): self.setup_memory() self.setup_modules(target) - if self.get_os_type() == 'linux': + if build_only is False and self.get_os_type() == 'linux': self.bind_interfaces_linux(dts.drivername) def setup_modules(self, target): @@ -101,6 +101,7 @@ class DPDKdut(Dut): if "igb_uio" in out: self.send_expect("rmmod -f igb_uio", "#", 70) self.send_expect("insmod ./" + target + "/kmod/igb_uio.ko", "#", 60) + out = self.send_expect("lsmod | grep igb_uio", "#") assert ("igb_uio" in out), "Failed to insmod igb_uio" -- 1.9.3