[Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration...
authorGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 25 Oct 2017 21:49:46 +0000 (21:49 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 25 Oct 2017 21:49:46 +0000 (21:49 +0000)
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.

llvm-svn: 316618

clang/utils/analyzer/SATestBuild.py
clang/utils/analyzer/SATestUtils.py

index 5853cf438af50c00d097704070b1b4fede0e6dd4..2cf02ea64afda4f1ac2ffb35f1c3f647f1e6283c 100755 (executable)
@@ -526,17 +526,11 @@ def runCmpResults(Dir, Strictness=0):
         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,)
+            print "Warning: %s differences in diagnostics." % NumDiffs
         if Strictness >= 2 and NumDiffs > 0:
             print "Error: Diffs found in strict mode (2)."
             TestsPassed = False
index 961ebfac1322089f6531a982ad026b5a0b5e3736..9220acc1bdbe7e3df145a7de542032f28a8841b4 100644 (file)
@@ -93,14 +93,6 @@ def runScript(ScriptPath, PBuildLogFile, Cwd):
             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.