[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1127/8267] oeqa.buildperf: add method to log shell commands
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1127/8267] oeqa.buildperf: add method to log shell commands
- Date: Sat, 16 Dec 2017 21:23:32 +0000 (UTC)
commit 1a0e20546ea451007b148f76c575eb3fea4bd8d1
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date: 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.
(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>
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 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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]