[oe-commits] [openembedded-core] 59/83: oeqa.buildperf: add method to log shell commands
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 1 15:32:27 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 8f0b11ba1266f9c650cf34d9b394d72009ee7207
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Thu Jun 16 14:29:46 2016 +0300
oeqa.buildperf: add method to log shell commands
Add new methods to BuildPerfTest class for running a shell
command and logging its output.
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oeqa/buildperf/base.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index d608061..230a7e7 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -112,6 +112,11 @@ class BuildPerfTest(object):
"""Actual test payload"""
raise NotImplementedError
+ def log_cmd_output(self, cmd):
+ """Run a command and log it's output"""
+ with open(self.cmd_log, 'a') as fobj:
+ runCmd(cmd, stdout=fobj)
+
def measure_cmd_resources(self, cmd, name, legend):
"""Measure system resource usage of a command"""
def str_time_to_timedelta(strtime):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list