]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa.buildperf: add method to log shell commands
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 16 Jun 2016 11:29:46 +0000 (14:29 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Jul 2016 15:08:49 +0000 (16:08 +0100)
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>
meta/lib/oeqa/buildperf/base.py

index d608061ec050dbc7cab427e3e20ef91d6583af80..230a7e7925cf19cbc6465c9e454c50d1834fe65c 100644 (file)
@@ -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):