Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit d67bfb9

Browse files
author
George Karpenkov
committed
[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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316618 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a535f1e commit d67bfb9

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

utils/analyzer/SATestBuild.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -526,17 +526,11 @@ def runCmpResults(Dir, Strictness=0):
526526
DiffsPath = os.path.join(NewDir, DiffsSummaryFileName)
527527
PatchedSourceDirPath = os.path.join(Dir, PatchedSourceDirName)
528528
Opts = CmpRuns.CmpOptions(DiffsPath, "", PatchedSourceDirPath)
529-
# Discard everything coming out of stdout
530-
# (CmpRun produces a lot of them).
531-
OLD_STDOUT = sys.stdout
532-
sys.stdout = SATestUtils.Discarder()
533529
# Scan the results, delete empty plist files.
534530
NumDiffs, ReportsInRef, ReportsInNew = \
535531
CmpRuns.dumpScanBuildResultsDiff(RefDir, NewDir, Opts, False)
536-
sys.stdout = OLD_STDOUT
537532
if (NumDiffs > 0):
538-
print "Warning: %r differences in diagnostics. See %s" % \
539-
(NumDiffs, DiffsPath,)
533+
print "Warning: %s differences in diagnostics." % NumDiffs
540534
if Strictness >= 2 and NumDiffs > 0:
541535
print "Error: Diffs found in strict mode (2)."
542536
TestsPassed = False

utils/analyzer/SATestUtils.py

-8
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ def runScript(ScriptPath, PBuildLogFile, Cwd):
9393
sys.exit(-1)
9494

9595

96-
class Discarder(object):
97-
"""
98-
Auxiliary object to discard stdout.
99-
"""
100-
def write(self, text):
101-
pass # do nothing
102-
103-
10496
def isCommentCSVLine(Entries):
10597
"""
10698
Treat CSV lines starting with a '#' as a comment.

0 commit comments

Comments
 (0)