summaryrefslogtreecommitdiffstats
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:41 +0100
commit33a38bc18a9cd3f04c573dab004965d00a1ed81f (patch)
treeb908805663738da62cc6cc0179d23ff65c24fc82
parent6d75f39f0997734b5c0222ae7b330168d6e23c91 (diff)
downloadpoky-33a38bc18a9cd3f04c573dab004965d00a1ed81f.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. (From OE-Core rev: 8997556040b2e7bfcfa6a75d4d97eb2e32207217) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 64c1a44733..de22850d4d 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -394,14 +394,15 @@ class BuildPerfTestCase(unittest.TestCase):
394 # Append to 'sizes' array for globalres log 394 # Append to 'sizes' array for globalres log
395 self.sizes.append(str(size)) 395 self.sizes.append(str(size))
396 396
397 def save_buildstats(self): 397 def save_buildstats(self, label=None):
398 """Save buildstats""" 398 """Save buildstats"""
399 bs_dirs = os.listdir(self.bb_vars['BUILDSTATS_BASE']) 399 bs_dirs = os.listdir(self.bb_vars['BUILDSTATS_BASE'])
400 if len(bs_dirs) > 1: 400 if len(bs_dirs) > 1:
401 log.warning("Multiple buildstats found for test %s, only " 401 log.warning("Multiple buildstats found for test %s, only "
402 "archiving the last one", self.name) 402 "archiving the last one", self.name)
403 postfix = '-' + label if label else ''
403 shutil.move(os.path.join(self.bb_vars['BUILDSTATS_BASE'], bs_dirs[-1]), 404 shutil.move(os.path.join(self.bb_vars['BUILDSTATS_BASE'], bs_dirs[-1]),
404 os.path.join(self.out_dir, 'buildstats-' + self.name)) 405 os.path.join(self.out_dir, 'buildstats' + postfix))
405 406
406 def rm_tmp(self): 407 def rm_tmp(self):
407 """Cleanup temporary/intermediate files and directories""" 408 """Cleanup temporary/intermediate files and directories"""