[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.

llvm-svn: 316618
This commit is contained in:
George Karpenkov 2017-10-25 21:49:46 +00:00
parent 134d8473ef
commit a932c8745c
2 changed files with 1 additions and 15 deletions

View File

@ -526,17 +526,11 @@ def runCmpResults(Dir, Strictness=0):
DiffsPath = os.path.join(NewDir, DiffsSummaryFileName) DiffsPath = os.path.join(NewDir, DiffsSummaryFileName)
PatchedSourceDirPath = os.path.join(Dir, PatchedSourceDirName) PatchedSourceDirPath = os.path.join(Dir, PatchedSourceDirName)
Opts = CmpRuns.CmpOptions(DiffsPath, "", PatchedSourceDirPath) 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. # Scan the results, delete empty plist files.
NumDiffs, ReportsInRef, ReportsInNew = \ NumDiffs, ReportsInRef, ReportsInNew = \
CmpRuns.dumpScanBuildResultsDiff(RefDir, NewDir, Opts, False) CmpRuns.dumpScanBuildResultsDiff(RefDir, NewDir, Opts, False)
sys.stdout = OLD_STDOUT
if (NumDiffs > 0): if (NumDiffs > 0):
print "Warning: %r differences in diagnostics. See %s" % \ print "Warning: %s differences in diagnostics." % NumDiffs
(NumDiffs, DiffsPath,)
if Strictness >= 2 and NumDiffs > 0: if Strictness >= 2 and NumDiffs > 0:
print "Error: Diffs found in strict mode (2)." print "Error: Diffs found in strict mode (2)."
TestsPassed = False TestsPassed = False

View File

@ -93,14 +93,6 @@ def runScript(ScriptPath, PBuildLogFile, Cwd):
sys.exit(-1) sys.exit(-1)
class Discarder(object):
"""
Auxiliary object to discard stdout.
"""
def write(self, text):
pass # do nothing
def isCommentCSVLine(Entries): def isCommentCSVLine(Entries):
""" """
Treat CSV lines starting with a '#' as a comment. Treat CSV lines starting with a '#' as a comment.