From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFC60A04AA; Tue, 8 Sep 2020 09:29:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C49EB1BE0C; Tue, 8 Sep 2020 09:29:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 333E92BAB for ; Tue, 8 Sep 2020 09:29:23 +0200 (CEST) IronPort-SDR: tjX+hmg/8FZBLhQCYqNeInqTE6wJyLdV3uIG8y1o0H93lc2X6KuItbsDWq2nASHRM0O3p+5/AL EZjU4x1K+L7Q== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="219646537" X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="219646537" 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:29:22 -0700 IronPort-SDR: zOF/l6TKjjAAyQchWGfua4b9RBfIvZovk+5Xs/yOBfkXecbSbMnEIZGBbMrCU1C/uGEeGHC6Bd rkjHkBZruQPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="377432589" Received: from unknown (HELO localhost.localdomain) ([10.240.183.52]) by orsmga001.jf.intel.com with ESMTP; 08 Sep 2020 00:29:21 -0700 From: "Zhou, Jun" To: dts@dpdk.org Cc: Zhou jun Date: Tue, 8 Sep 2020 07:17:51 +0000 Message-Id: <20200908071825.118583-5-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 Content-Transfer-Encoding: 8bit Subject: [dts] [dts 04/38] tests/TestSuite_efd.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_efd.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/TestSuite_efd.py b/tests/TestSuite_efd.py index 007e03b..36df999 100644 --- a/tests/TestSuite_efd.py +++ b/tests/TestSuite_efd.py @@ -46,14 +46,12 @@ class TestEFD(TestCase): """ self.tester.extend_external_packet_generator(TestEFD, self) - out = self.dut.build_dpdk_apps("./examples/server_node_efd") - self.verify("Error" not in out, "Compilation error") - self.verify("No such" not in out, "Compilation error") + self.build_server_node_efd() self.dut_ports = self.dut.get_ports() - self.node_app = "./examples/server_node_efd/node/%s/node" % self.target - self.server_app = "./examples/server_node_efd/server/%s/server" % self.target - + self.node_app = self.dut.apps_name['node'] + self.server_app = self.dut.apps_name['server'] + self.app_test_path = self.dut.apps_name['test'] # get dts output path if self.logger.log_path.startswith(os.sep): self.output_path = self.logger.log_path @@ -64,6 +62,13 @@ class TestEFD(TestCase): # create an instance to set stream field setting self.pktgen_helper = PacketGeneratorHelper() + def build_server_node_efd(self): + apps = ['node', 'server'] + for app in apps: + out = self.dut.build_dpdk_apps("./examples/server_node_efd/%s" % app) + self.verify("Error" not in out, "Compilation %s error" % app) + self.verify("No such" not in out, "Compilation %s error" % app) + def set_up(self): """ Run before each test case. @@ -74,7 +79,7 @@ class TestEFD(TestCase): """ Run EFD unit test """ - self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "RTE>>", 60) + self.dut.send_expect("./%s -n 1 -c f" % self.app_test_path, "RTE>>", 60) out = self.dut.send_expect("efd_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -83,7 +88,7 @@ class TestEFD(TestCase): """ Run EFD unit perf test """ - self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "RTE>>", 60) + self.dut.send_expect("./%s -n 1 -c f" % self.app_test_path, "RTE>>", 60) out = self.dut.send_expect("efd_perf_autotest", "RTE>>", 120) self.logger.info(out) self.dut.send_expect("quit", "# ") @@ -156,9 +161,7 @@ class TestEFD(TestCase): # change value length and rebuild dpdk self.dut.send_expect("sed -i -e 's/#define RTE_EFD_VALUE_NUM_BITS .*$/#define RTE_EFD_VALUE_NUM_BITS (%d)/' lib/librte_efd/rte_efd.h" % val_bitnum, "#") self.dut.build_install_dpdk(self.target) - out = self.dut.build_dpdk_apps("./examples/server_node_efd") - self.verify("Error" not in out, "Compilation error") - self.verify("No such" not in out, "Compilation error") + self.build_server_node_efd() pps = self._efd_perf_evaluate(2, flow_num) self.result_table_add([val_bitnum, 2, "2M", pps]) @@ -166,9 +169,7 @@ class TestEFD(TestCase): self.result_table_print() self.dut.send_expect("sed -i -e 's/#define RTE_EFD_VALUE_NUM_BITS .*$/#define RTE_EFD_VALUE_NUM_BITS (8)/' lib/librte_efd/rte_efd.h", "#") self.dut.build_install_dpdk(self.target) - out = self.dut.build_dpdk_apps("./examples/server_node_efd") - self.verify("Error" not in out, "Compilation error") - self.verify("No such" not in out, "Compilation error") + self.build_server_node_efd() def _efd_perf_evaluate(self, node_num, flow_num): # extended flow number into etgen module -- 1.8.3.1