From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, lei.a.yao@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V2 3/8] power_pbf: support meson
Date: Thu, 17 Sep 2020 09:05:08 +0800 [thread overview]
Message-ID: <20200917010513.15783-4-yufengx.mo@intel.com> (raw)
In-Reply-To: <20200917010513.15783-1-yufengx.mo@intel.com>
support meson build.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
tests/TestSuite_power_pbf.py | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py
index eb5a16e..6109a3b 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,13 +138,8 @@ class TestPowerPbf(TestCase):
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 create_powermonitor_folder(self):
cmd = 'mkdir -p {0}; chmod 777 {0}'.format('/tmp/powermonitor')
@@ -151,12 +148,13 @@ 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)
- self.dut.skip_setup = False
+ 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)
self.dut.build_install_dpdk(self.target)
# set up vm power management binary process setting
self.vm_power_mgr = self.prepare_binary('vm_power_manager')
--
2.21.0
next prev parent reply other threads:[~2020-09-17 1:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 1:05 [dts] [PATCH V2 0/8] power: power suite series " yufengmx
2020-09-17 1:05 ` [dts] [PATCH V2 1/8] power_bidirection_channel: " yufengmx
2020-09-17 1:05 ` [dts] [PATCH V2 2/8] power_empty_poll: " yufengmx
2020-09-17 1:05 ` yufengmx [this message]
2020-09-17 1:05 ` [dts] [PATCH V2 4/8] power_pstate: " yufengmx
2020-09-17 1:05 ` [dts] [PATCH V2 5/8] power_telemetry: " yufengmx
2020-09-17 1:05 ` [dts] [PATCH V2 6/8] vm_pw_mgmt_policy: " yufengmx
2020-09-17 1:05 ` [dts] [PATCH V2 7/8] malicious_driver_event_indication: " yufengmx
2020-09-17 1:05 ` [dts] [PATCH V2 8/8] conf: power suite series " yufengmx
2020-09-23 8:57 ` Tu, Lijuan
2020-09-17 1:13 ` [dts] [PATCH V2 0/8] power: " Mo, YufengX
2020-09-17 8:55 ` Ma, LihongX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200917010513.15783-4-yufengx.mo@intel.com \
--to=yufengx.mo@intel.com \
--cc=dts@dpdk.org \
--cc=lei.a.yao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).