r316618 - [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests
George Karpenkov via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 25 14:49:46 PDT 2017
Author: george.karpenkov
Date: Wed Oct 25 14:49:46 2017
New Revision: 316618
URL: http://llvm.org/viewvc/llvm-project?rev=316618&view=rev
Log:
[Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests
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.
Modified:
cfe/trunk/utils/analyzer/SATestBuild.py
cfe/trunk/utils/analyzer/SATestUtils.py
Modified: cfe/trunk/utils/analyzer/SATestBuild.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestBuild.py?rev=316618&r1=316617&r2=316618&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/SATestBuild.py (original)
+++ cfe/trunk/utils/analyzer/SATestBuild.py Wed Oct 25 14:49:46 2017
@@ -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
Modified: cfe/trunk/utils/analyzer/SATestUtils.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestUtils.py?rev=316618&r1=316617&r2=316618&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/SATestUtils.py (original)
+++ cfe/trunk/utils/analyzer/SATestUtils.py Wed Oct 25 14:49:46 2017
@@ -93,14 +93,6 @@ def runScript(ScriptPath, PBuildLogFile,
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.
More information about the cfe-commits
mailing list