[PATCH] D39269: [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 24 17:41:56 PDT 2017


george.karpenkov created this revision.
Herald added subscribers: szepet, xazax.hun.

Contrary to the deleted comment, in most cases CmpRuns.py produces a fairly small amount of output, which is useful to see straight away to see what has changed when executing the integration tests.


https://reviews.llvm.org/D39269

Files:
  utils/analyzer/SATestBuild.py
  utils/analyzer/SATestUtils.py


Index: utils/analyzer/SATestUtils.py
===================================================================
--- utils/analyzer/SATestUtils.py
+++ utils/analyzer/SATestUtils.py
@@ -93,14 +93,6 @@
             sys.exit(-1)
 
 
-class Discarder(object):
-    """
-    Auxiliary object to discard stdout.
-    """
-    def write(self, text):
-        pass  # do nothing
-
-
 def isCommentCSVLine(Entries):
     """
     Treat CSV lines starting with a '#' as a comment.
Index: utils/analyzer/SATestBuild.py
===================================================================
--- utils/analyzer/SATestBuild.py
+++ utils/analyzer/SATestBuild.py
@@ -526,14 +526,9 @@
         DiffsPath = os.path.join(NewDir, DiffsSummaryFileName)
         PatchedSourceDirPath = os.path.join(Dir, PatchedSourceDirName)
         Opts = CmpRuns.CmpOptions(DiffsPath, "", PatchedSourceDirPath)
-        # Discard everything coming out of stdout
-        # (CmpRun produces a lot of them).
-        OLD_STDOUT = sys.stdout
-        sys.stdout = SATestUtils.Discarder()
         # Scan the results, delete empty plist files.
         NumDiffs, ReportsInRef, ReportsInNew = \
             CmpRuns.dumpScanBuildResultsDiff(RefDir, NewDir, Opts, False)
-        sys.stdout = OLD_STDOUT
         if (NumDiffs > 0):
             print "Warning: %r differences in diagnostics. See %s" % \
                   (NumDiffs, DiffsPath,)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39269.120159.patch
Type: text/x-patch
Size: 1394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171025/e8b2fedf/attachment-0001.bin>


More information about the cfe-commits mailing list