[LNT] r213128 - Handle cases where there is no results

Yi Kong Yi.Kong at arm.com
Wed Jul 16 02:06:56 PDT 2014


Author: kongyi
Date: Wed Jul 16 04:06:51 2014
New Revision: 213128

URL: http://llvm.org/viewvc/llvm-project?rev=213128&view=rev
Log:
Handle cases where there is no results

Make sure LNT does not fail when test result is empty.

Modified:
    lnt/trunk/lnt/server/reporting/analysis.py

Modified: lnt/trunk/lnt/server/reporting/analysis.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/analysis.py?rev=213128&r1=213127&r2=213128&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Wed Jul 16 04:06:51 2014
@@ -257,7 +257,10 @@ class RunInfo(object):
 
     def get_geomean_comparison_result(self, run, compare_to, field, tests,
                                       comparison_window=[]):
-        prev_values,run_values = zip(*[(cr.previous,cr.current) for _,_,cr in tests])
+        if tests:
+            prev_values,run_values = zip(*[(cr.previous,cr.current) for _,_,cr in tests])
+        else:
+            prev_values,run_values = [], []
 
         run_geomean = self._calc_geomean(run_values)
         prev_geomean = self._calc_geomean(prev_values)





More information about the llvm-commits mailing list