aboutsummaryrefslogtreecommitdiff
path: root/lnt/server
diff options
context:
space:
mode:
authorDanila Malyutin <danila@synopsys.com>2019-01-09 11:58:52 +0000
committerDanila Malyutin <danila@synopsys.com>2019-01-09 11:58:52 +0000
commitb625d83c70277422bc3076fdb891e7780389ad25 (patch)
tree0ef3437dfa1cf797d31b4e0bba15b1896fd4fd32 /lnt/server
parent98c1a87691fd4bf4376d8c068918aa9ff312e83d (diff)
[LNT] fix ValueError in a corner case of geomean comparison
Fixes ValueError('need more than 0 values to unpack',) that could appear in some corner cases when viewing results (the fewer runs you have in your db the more likely you'll encounter it). Differential revision: https://reviews.llvm.org/D56133 git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@350704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lnt/server')
-rw-r--r--lnt/server/reporting/analysis.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lnt/server/reporting/analysis.py b/lnt/server/reporting/analysis.py
index f2ecc04..4929936 100644
--- a/lnt/server/reporting/analysis.py
+++ b/lnt/server/reporting/analysis.py
@@ -368,11 +368,12 @@ class RunInfo(object):
return r
def get_geomean_comparison_result(self, run, compare_to, field, tests):
- if tests:
+ unchanged_tests = [(cr.previous, cr.current, cr.prev_hash, cr.cur_hash)
+ for _, _, cr in tests
+ if cr.get_test_status() == UNCHANGED_PASS]
+ if unchanged_tests:
prev_values, run_values, prev_hash, cur_hash = zip(
- *[(cr.previous, cr.current, cr.prev_hash, cr.cur_hash)
- for _, _, cr in tests
- if cr.get_test_status() == UNCHANGED_PASS])
+ *unchanged_tests)
prev_values = [x for x in prev_values if x is not None]
run_values = [x for x in run_values if x is not None]
prev_hash = [x for x in prev_hash if x is not None]