r316534 - [Analyzer] [Tests] Remove temporary fields from generated reference results.

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 24 16:52:47 PDT 2017

Author: george.karpenkov
Date: Tue Oct 24 16:52:46 2017
New Revision: 316534

URL: http://llvm.org/viewvc/llvm-project?rev=316534&view=rev
[Analyzer] [Tests] Remove temporary fields from generated reference results.

Pointer to HTML diagnostics is removed (as it is not stored) as well as
the version (as it would be available from the commit message).


Modified: cfe/trunk/utils/analyzer/SATestBuild.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestBuild.py?rev=316534&r1=316533&r2=316534&view=diff
--- cfe/trunk/utils/analyzer/SATestBuild.py (original)
+++ cfe/trunk/utils/analyzer/SATestBuild.py Tue Oct 24 16:52:46 2017
@@ -493,6 +493,14 @@ def normalizeReferenceResults(Dir, SBOut
                      if SourceFile.startswith(PathPrefix)
                      else SourceFile for SourceFile in Data['files']]
             Data['files'] = Paths
+            # Remove transient fields which change from run to run.
+            for Diag in Data['diagnostics']:
+                if 'HTMLDiagnostics_files' in Diag:
+                    Diag.pop('HTMLDiagnostics_files')
+            if 'clang_version' in Data:
+                Data.pop('clang_version')
             plistlib.writePlist(Data, Plist)

More information about the cfe-commits mailing list