summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-27 18:20:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:03:59 +0000
commitaf205d9a13d182a0b590426ba8c4e3dff7f3f02b (patch)
treedc6f17fafad843468b4ca1f171197b3bc8b659ee /meta/lib
parent952a455c09eb88755b2d24ae05c2d6b886922b63 (diff)
downloadopenembedded-core-af205d9a13d182a0b590426ba8c4e3dff7f3f02b.tar.gz
openembedded-core-af205d9a13d182a0b590426ba8c4e3dff7f3f02b.tar.bz2
openembedded-core-af205d9a13d182a0b590426ba8c4e3dff7f3f02b.zip
oeqa.buildperf: prevent a crash on unexpected success
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/buildperf/base.py7
1 files changed, 5 insertions, 2 deletions
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):