[LNT] r239138 - Fix report submission when there are failed tests.

James Molloy james.molloy at arm.com
Fri Jun 5 01:43:28 PDT 2015


Author: jamesm
Date: Fri Jun  5 03:43:27 2015
New Revision: 239138

URL: http://llvm.org/viewvc/llvm-project?rev=239138&view=rev
Log:
Fix report submission when there are failed tests.

When tests fail, we get a .exec.status field type. This has integer
type, so calling the stats.* functions will now assert and the
import will silently fail (because the assert is caught).

Ensure we bypass the stats.* functions when we have integer data.

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=239138&r1=239137&r2=239138&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Fri Jun  5 03:43:27 2015
@@ -77,7 +77,11 @@ class ComparisonResult:
 
         # If we have multiple values for this run, use that to estimate the
         # distribution.
-        if samples and len(samples) > 1:
+        #
+        # We can get integer sample types here - for example if the field is
+        # .exec.status. Make sure we don't assert by avoiding the stats
+        # functions in this case.
+        if samples and len(samples) > 1 and isinstance(samples[0], float):
             self.stddev = stats.standard_deviation(samples)
             self.MAD = stats.median_absolute_deviation(samples)
         else:





More information about the llvm-commits mailing list