aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/buildperf
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-08-29 22:48:25 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-03 09:58:30 +0100
commit8997556040b2e7bfcfa6a75d4d97eb2e32207217 (patch)
tree7a833683c741d3004fb24f797ffa3138ec36db22 /meta/lib/oeqa/buildperf
parent64ff34df96aa9a74dd4303f76ec711aa5e9d5030 (diff)
downloadopenembedded-core-contrib-8997556040b2e7bfcfa6a75d4d97eb2e32207217.tar.gz
oeqa.buildperf: rename buildstats directories
Change directory name from 'buildstats-<test_name>' to just 'buildstats'. However, this patch adds the possibility to label buildstats directory name with a postfix which makes it possible to save multiple buildstats per test, for example. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/buildperf')
-rw-r--r--meta/lib/oeqa/buildperf/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 64c1a447336..de22850d4d5 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -394,14 +394,15 @@ class BuildPerfTestCase(unittest.TestCase):
# Append to 'sizes' array for globalres log
self.sizes.append(str(size))
- def save_buildstats(self):
+ def save_buildstats(self, label=None):
"""Save buildstats"""
bs_dirs = os.listdir(self.bb_vars['BUILDSTATS_BASE'])
if len(bs_dirs) > 1:
log.warning("Multiple buildstats found for test %s, only "
"archiving the last one", self.name)
+ postfix = '-' + label if label else ''
shutil.move(os.path.join(self.bb_vars['BUILDSTATS_BASE'], bs_dirs[-1]),
- os.path.join(self.out_dir, 'buildstats-' + self.name))
+ os.path.join(self.out_dir, 'buildstats' + postfix))
def rm_tmp(self):
"""Cleanup temporary/intermediate files and directories"""