diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-06-16 14:29:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:08:49 +0100 |
commit | 8f0b11ba1266f9c650cf34d9b394d72009ee7207 (patch) | |
tree | c572db8feefb2de3291ec93aae0cf23fee238fd0 /meta | |
parent | ced156bfea4a6649d201f41275641a633f218322 (diff) | |
download | openembedded-core-8f0b11ba1266f9c650cf34d9b394d72009ee7207.tar.gz openembedded-core-8f0b11ba1266f9c650cf34d9b394d72009ee7207.tar.bz2 openembedded-core-8f0b11ba1266f9c650cf34d9b394d72009ee7207.zip |
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@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/buildperf/base.py | 5 |
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): """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): |