[LNT] r309613 - Report no_errors as a string for now

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 13:10:36 PDT 2017


Author: matze
Date: Mon Jul 31 13:10:36 2017
New Revision: 309613

URL: http://llvm.org/viewvc/llvm-project?rev=309613&view=rev
Log:
Report no_errors as a string for now

Putting in a boolean breaks the LNT run page. The buildbot jobs
use the latest LNT version for submitting data so we should stay with
strings until r309149 is deployed on lnt.llvm.org.

Modified:
    lnt/trunk/lnt/lnttool/main.py
    lnt/trunk/lnt/testing/__init__.py
    lnt/trunk/tests/runtest/test_suite.py

Modified: lnt/trunk/lnt/lnttool/main.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/main.py?rev=309613&r1=309612&r2=309613&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/main.py (original)
+++ lnt/trunk/lnt/lnttool/main.py Mon Jul 31 13:10:36 2017
@@ -121,7 +121,7 @@ def action_check_no_errors(files):
             error_msg = 'Could not find run section'
             break
         no_errors = run_info.get('no_errors', False)
-        if no_errors != True:
+        if no_errors != True and no_errors != "True":
             error_msg = 'run section does not specify "no_errors": true'
             break
     if error_msg is not None:

Modified: lnt/trunk/lnt/testing/__init__.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/testing/__init__.py?rev=309613&r1=309612&r2=309613&view=diff
==============================================================================
--- lnt/trunk/lnt/testing/__init__.py (original)
+++ lnt/trunk/lnt/testing/__init__.py Mon Jul 31 13:10:36 2017
@@ -113,11 +113,7 @@ class Run:
         # Convert keys/values that are not json encodable to strings.
         for key, value in info.items():
             key = str(key)
-            # Keep True, False, None as they are trivially json encodable.
-            # I would love to do the same for numbers but I fear that will
-            # break compatibility...
-            if value is not True and value is not False and value is not None:
-                value = str(value)
+            value = str(value)
             self.info[key] = value
         if '__report_version__' in self.info:
             raise ValueError("'__report_version__' key is reserved")

Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=309613&r1=309612&r2=309613&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Mon Jul 31 13:10:36 2017
@@ -20,7 +20,7 @@
 # RUN: FileCheck  --check-prefix CHECK-CSV < %t.SANDBOX/build/test-results.csv %s
 # RUN: FileCheck  --check-prefix CHECK-CHECKFORMAT < %t.checkformat %s
 
-# CHECK-REPORT: "no_errors": false,
+# CHECK-REPORT: "no_errors": "False",
 # CHECK-REPORT: "run_order": "154331"
 # CHECK-REPORT: "Name": "nts.{{[^.]+}}.compile"
 # CHECK-REPORT: "Name": "nts.{{[^.]+}}.compile.status"




More information about the llvm-commits mailing list