summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-06-16 14:29:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:22:46 +0100
commit1a0e20546ea451007b148f76c575eb3fea4bd8d1 (patch)
tree28857b435f37325da297829c03085bccbb84a167 /meta/lib
parent6e27b2ae0ebab02efefc39014fd59817f53a5853 (diff)
downloadpoky-1a0e20546ea451007b148f76c575eb3fea4bd8d1.tar.gz
oeqa.buildperf: add method to log shell commands
Add new methods to BuildPerfTest class for running a shell command and logging its output. (From OE-Core rev: 8f0b11ba1266f9c650cf34d9b394d72009ee7207) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/buildperf/base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index d608061ec0..230a7e7925 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -112,6 +112,11 @@ class BuildPerfTest(object):
112 """Actual test payload""" 112 """Actual test payload"""
113 raise NotImplementedError 113 raise NotImplementedError
114 114
115 def log_cmd_output(self, cmd):
116 """Run a command and log it's output"""
117 with open(self.cmd_log, 'a') as fobj:
118 runCmd(cmd, stdout=fobj)
119
115 def measure_cmd_resources(self, cmd, name, legend): 120 def measure_cmd_resources(self, cmd, name, legend):
116 """Measure system resource usage of a command""" 121 """Measure system resource usage of a command"""
117 def str_time_to_timedelta(strtime): 122 def str_time_to_timedelta(strtime):