From patchwork Tue Sep 8 07:18:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhou, JunX W" X-Patchwork-Id: 76871 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A5A8AA04AA; Tue, 8 Sep 2020 09:30:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9D0211C135; Tue, 8 Sep 2020 09:30:15 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 7B3F21C128 for ; Tue, 8 Sep 2020 09:30:12 +0200 (CEST) IronPort-SDR: xsfqv3hQDKj8t1fhVByMN400pLIw1FDCM8LjFzABvHv6wOg+9+567Nks5S0Ty4zamw8A1VNSoN 27SG92T7K01g== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="219646667" X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="219646667" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 00:30:12 -0700 IronPort-SDR: miK2qIlWH0/79do6j2JJS5WF1laU2Qc7pExeQCoPwkLy2WYCtRqmcah1hVEtzD+pg5iXQvKqS5 PgcJ7aM+Un5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="377432922" Received: from unknown (HELO localhost.localdomain) ([10.240.183.52]) by orsmga001.jf.intel.com with ESMTP; 08 Sep 2020 00:30:10 -0700 From: "Zhou, Jun" To: dts@dpdk.org Cc: Zhou jun Date: Tue, 8 Sep 2020 07:18:23 +0000 Message-Id: <20200908071825.118583-37-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200908071825.118583-1-junx.w.zhou@intel.com> References: <20200908071825.118583-1-junx.w.zhou@intel.com> MIME-Version: 1.0 Subject: [dts] [dts 36/38] tests/TestSuite_vm2vm_virtio_user.py: adapt to support both meson and makefile build 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Zhou jun Signed-off-by: Zhou jun --- tests/TestSuite_vm2vm_virtio_user.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_vm2vm_virtio_user.py b/tests/TestSuite_vm2vm_virtio_user.py index e743e61..16b90c0 100644 --- a/tests/TestSuite_vm2vm_virtio_user.py +++ b/tests/TestSuite_vm2vm_virtio_user.py @@ -59,6 +59,8 @@ class TestVM2VMVirtioUser(TestCase): self.rebuild_flag = False self.config_value = 'CONFIG_RTE_LIBRTE_PMD_PCAP' self.enable_pcap_lib_in_dpdk(self.dut) + self.app_testpmd_path = self.dut.apps_name['test-pmd'] + self.app_pdump = self.dut.apps_name['pdump'] def set_up(self): """ @@ -98,6 +100,7 @@ class TestVM2VMVirtioUser(TestCase): if str.lower(default_value) != 'y': client_dut.send_expect("sed -i 's/%s=n$/%s=y/' config/common_base" % ( self.config_value, self.config_value), '# ') + client_dut.set_build_options({'RTE_LIBRTE_PMD_PCAP': 'y'}) client_dut.build_install_dpdk(self.target) self.rebuild_flag = True @@ -108,6 +111,7 @@ class TestVM2VMVirtioUser(TestCase): if self.rebuild_flag is True: client_dut.send_expect("sed -i 's/%s=y$/%s=n/' config/common_base" % (self.config_value, self.config_value), "#") + client_dut.set_build_options({'RTE_LIBRTE_PMD_PCAP': 'n'}) client_dut.build_install_dpdk(self.target) def launch_vhost_testpmd(self, vdev_num, fixed_prefix=False, fwd_mode='io'): @@ -117,7 +121,7 @@ class TestVM2VMVirtioUser(TestCase): for i in range(vdev_num): vdev_params += "--vdev 'net_vhost%d,iface=./vhost-net%d,queues=1' " % (i, i) - self.command_line = self.dut.target + '/app/testpmd %s ' + \ + self.command_line = self.app_testpmd_path + ' %s ' + \ '--socket-mem %s %s -- -i --nb-cores=1 --no-flush-rx' self.command_line = self.command_line % ( @@ -139,7 +143,7 @@ class TestVM2VMVirtioUser(TestCase): if self.check_2M_env: eal_params += " --single-file-segments " vdev_params = '--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,%s,queue_size=%d ' % (path_mode, ringsize) - command_line = self.dut.target + "/app/testpmd %s " + \ + command_line = self.app_testpmd_path + " %s " + \ "--socket-mem %s %s -- -i --nb-cores=1 --txd=%d --rxd=%d %s" command_line = command_line % (eal_params, self.socket_mem, vdev_params, ringsize, ringsize, extern_params) @@ -157,7 +161,7 @@ class TestVM2VMVirtioUser(TestCase): if self.check_2M_env: eal_params += " --single-file-segments " vdev_params = '--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,%s,queue_size=%d ' % (path_mode, ringsize) - command_line = self.dut.target + '/app/testpmd %s ' + \ + command_line = self.app_testpmd_path + ' %s ' + \ '--socket-mem %s %s -- -i --nb-cores=1 --txd=%d --rxd=%d %s' command_line = command_line % (eal_params, self.socket_mem, vdev_params, ringsize, ringsize, extern_params) @@ -184,7 +188,7 @@ class TestVM2VMVirtioUser(TestCase): """ eal_params = self.dut.create_eal_parameters(cores='Default', prefix=file_prefix, fixed_prefix=True) - command_line = self.target + "/app/dpdk-pdump %s -v -- " + \ + command_line = self.app_pdump + " %s -v -- " + \ "--pdump '%s,queue=*,rx-dev=%s,mbuf-size=8000'" self.pdump_session.send_expect(command_line % (eal_params, dump_port, filename), 'Port')