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 892B3A04BB; Fri, 25 Sep 2020 04:21:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 791C41E4AA; Fri, 25 Sep 2020 04:21:03 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D0C641E4AF for ; Fri, 25 Sep 2020 04:20:59 +0200 (CEST) IronPort-SDR: BsmP6Cr162CkaCa23Pl4/8XalkiuXbsdzZrx+NID17g1+oKUM6s6Ouz8DhvVEwTVJS9RBH1YC6 G7A+3rHX2KBg== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="140837203" X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="140837203" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 19:20:59 -0700 IronPort-SDR: TKWRJjephyBIWOYPBy0R2iE0OLd4VqMsbHx8UKeHPvsBvFPvbHZYcLepPBo6KBNZqTUGosdalm uADUJzxwna8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="348092950" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by FMSMGA003.fm.intel.com with ESMTP; 24 Sep 2020 19:20:58 -0700 From: yufengmx To: dts@dpdk.org, lei.a.yao@intel.com Cc: yufengmx Date: Fri, 25 Sep 2020 10:17:09 +0800 Message-Id: <20200925021711.33756-6-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200925021711.33756-1-yufengx.mo@intel.com> References: <20200925021711.33756-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V3 5/7] power_telemetry: support meson 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" support meson build. Signed-off-by: yufengmx --- tests/TestSuite_power_telemetry.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/TestSuite_power_telemetry.py b/tests/TestSuite_power_telemetry.py index 90404e3..0af30d7 100644 --- a/tests/TestSuite_power_telemetry.py +++ b/tests/TestSuite_power_telemetry.py @@ -42,6 +42,8 @@ import json from copy import deepcopy from pprint import pformat +from settings import load_global_setting +from settings import HOST_BUILD_TYPE_SETTING from utils import create_mask as dts_create_mask from settings import HEADER_SIZE from test_case import TestCase @@ -92,7 +94,7 @@ class TestPowerTelemetry(TestCase): def add_stream_to_pktgen(self, option): stream_ids = [] - topos = [[0, 1], [1, 0]] + topos = [[0, 0]] for txport, rxport in topos: _option = deepcopy(option) dmac = self.dut.get_mac_address(self.dut_ports[txport]) @@ -126,22 +128,20 @@ class TestPowerTelemetry(TestCase): if self.dut.skip_setup: return SW = "CONFIG_RTE_LIBRTE_TELEMETRY" - cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}/config/common_base".format( - SW, self.target_dir) - self.d_a_con(cmd) + if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING): + self.dut.set_build_options({SW[7:]: 'y'}) + else: + cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}/config/common_base".format( + SW, self.target_dir) + self.d_a_con(cmd) # re-compile dpdk source code self.dut.build_install_dpdk(self.target) def prepare_binary(self, name): example_dir = "examples/" + name out = self.dut.build_dpdk_apps('./' + example_dir) - self.verify("Error" not in out, "Compilation error") - self.verify("No such" not in out, "Compilation error") - binary_dir = os.path.join(self.target_dir, example_dir, 'build') - cmd = ["ls -F {0} | grep '*'".format(binary_dir), '# ', 5] - exec_file = self.d_a_con(cmd) - binary_file = os.path.join(binary_dir, exec_file[:-1]) - return binary_file + return os.path.join(self.target_dir, + self.dut.apps_name[os.path.basename(name)]) def get_cores_mask(self, config): ports_socket = self.dut.get_numa_id(self.dut.get_ports()[0]) -- 2.21.0