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,)


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,)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to