[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2194/8267] oeqa.buildperf: strip date from buildstats directory path



commit 700ebe996a1ad5c82e55228d04a7b5a0f2d1f0c7
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date:   Mon Aug 29 22:48:23 2016 +0300

    oeqa.buildperf: strip date from buildstats directory path
    
    Archive buildstats in a directory like 'buildstats' instead of something
    like 'buildstats/20160513120000'.
    
    (From OE-Core rev: 95138cdc70bb7f9b7ab74e1d83305f009790dccc)
    
    Signed-off-by: Markus Lehtonen <markus lehtonen linux intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/lib/oeqa/buildperf/base.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index eed0266..4918e79 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -395,7 +395,11 @@ class BuildPerfTestCase(unittest.TestCase):
 
     def save_buildstats(self):
         """Save buildstats"""
-        shutil.move(self.bb_vars['BUILDSTATS_BASE'],
+        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)
+        shutil.move(os.path.join(self.bb_vars['BUILDSTATS_BASE'], bs_dirs[-1]),
                     os.path.join(self.out_dir, 'buildstats-' + self.name))
 
     def rm_tmp(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]