From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mail.openembedded.org (Postfix) with ESMTP id 8F8C86612D for ; Mon, 29 Aug 2016 19:48:50 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 29 Aug 2016 12:48:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,252,1470726000"; d="scan'208";a="872304282" Received: from dthoumin-mobl2.ger.corp.intel.com (HELO mqz-osx-suse64.fi.intel.com) ([10.252.6.138]) by orsmga003.jf.intel.com with ESMTP; 29 Aug 2016 12:48:50 -0700 From: Markus Lehtonen To: openembedded-core@lists.openembedded.org Date: Mon, 29 Aug 2016 22:48:23 +0300 Message-Id: <1472500111-12358-5-git-send-email-markus.lehtonen@linux.intel.com> X-Mailer: git-send-email 2.6.6 In-Reply-To: <1472500111-12358-1-git-send-email-markus.lehtonen@linux.intel.com> References: <1472500111-12358-1-git-send-email-markus.lehtonen@linux.intel.com> Subject: [PATCH 04/12] oeqa.buildperf: strip date from buildstats directory path X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 19:48:50 -0000 Archive buildstats in a directory like 'buildstats' instead of something like 'buildstats/20160513120000'. Signed-off-by: Markus Lehtonen --- meta/lib/oeqa/buildperf/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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): -- 2.6.6