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 5E801A04C7; Tue, 15 Sep 2020 10:36:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 57C3B1C0CD; Tue, 15 Sep 2020 10:36:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 81A9D160 for ; Tue, 15 Sep 2020 10:36:55 +0200 (CEST) IronPort-SDR: e7/fnAsLJvhxscueIcI4CK/kuLOg9dyfi3Vqc03icGCo3Ouo4wElLIUEvHFiKnQrMTJIXFIAff ZrF+qiRWKYbw== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="146962914" X-IronPort-AV: E=Sophos;i="5.76,429,1592895600"; d="scan'208";a="146962914" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 01:36:55 -0700 IronPort-SDR: oREwpj1Q5RwwW7Q8pAFlCGHzacl2gbF28VDrw+1WWpJyjzmd7/M1WwGCsuIvajP8BDxMnncoYU zxQhq6EHK/TQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,429,1592895600"; d="scan'208";a="286736500" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by fmsmga007.fm.intel.com with ESMTP; 15 Sep 2020 01:36:53 -0700 From: yufengmx To: dts@dpdk.org, lei.a.yao@intel.com Cc: yufengmx Date: Tue, 15 Sep 2020 16:33:47 +0800 Message-Id: <20200915083351.12506-4-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200915083351.12506-1-yufengx.mo@intel.com> References: <20200915083351.12506-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1 3/7] power_pbf: 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_pbf.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py index eb5a16e..d10af99 100644 --- a/tests/TestSuite_power_pbf.py +++ b/tests/TestSuite_power_pbf.py @@ -40,6 +40,8 @@ from collections import Counter from pprint import pformat # import dts libs +from settings import load_global_setting +from settings import HOST_BUILD_TYPE_SETTING from test_case import TestCase from exception import VerifyFailure from utils import create_mask @@ -136,6 +138,9 @@ class TestPowerPbf(TestCase): def prepare_binary(self, name): example_dir = "examples/" + name out = self.dut.build_dpdk_apps('./' + example_dir) + if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING): + return os.path.join(self.target_dir, + self.dut.apps_name[os.path.basename(name)]) 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') @@ -151,13 +156,17 @@ class TestPowerPbf(TestCase): def init_test_binary_file(self): self.create_powermonitor_folder() # open debug SW - cmd = ("sed -i -e 's/" - "CONFIG_RTE_LIBRTE_POWER_DEBUG=n$/" - "CONFIG_RTE_LIBRTE_POWER_DEBUG=y/" - "' {0}/config/common_base").format(self.target_dir) - self.d_a_con(cmd) + SW = "CONFIG_RTE_LIBRTE_POWER_DEBUG" + 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) + back = self.dut.skip_setup self.dut.skip_setup = False self.dut.build_install_dpdk(self.target) + self.dut.skip_setup = back # set up vm power management binary process setting self.vm_power_mgr = self.prepare_binary('vm_power_manager') # set up distributor binary process setting -- 2.21.0