From ef988b3d06d71fe0dfb5d16e01dc9071ca0a095a Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 27 Oct 2016 18:20:46 +0300 Subject: oeqa.buildperf: prevent a crash on unexpected success (From OE-Core rev: af205d9a13d182a0b590426ba8c4e3dff7f3f02b) Signed-off-by: Markus Lehtonen Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/buildperf/base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py index 59dd02521c..4955914c23 100644 --- a/meta/lib/oeqa/buildperf/base.py +++ b/meta/lib/oeqa/buildperf/base.py @@ -137,7 +137,7 @@ class BuildPerfTestResult(unittest.TextTestResult): def addSuccess(self, test): """Record results from successful tests""" super(BuildPerfTestResult, self).addSuccess(test) - self.successes.append((test, None)) + self.successes.append(test) def startTest(self, test): """Pre-test hook""" @@ -165,7 +165,10 @@ class BuildPerfTestResult(unittest.TextTestResult): 'SKIPPED': self.skipped} for status, tests in result_map.items(): for test in tests: - yield (status, test) + if isinstance(test, tuple): + yield (status, test) + else: + yield (status, (test, None)) def update_globalres_file(self, filename): -- cgit v1.2.3-54-g00ecf