From: George Karpenkov Date: Thu, 26 Oct 2017 19:00:22 +0000 (+0000) Subject: [Analyzer] [Tests] Write analyzers crashes to stdout, and not to a separate file X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bce8668f19401f4fc021a74f3fe323574476ed28;p=clang [Analyzer] [Tests] Write analyzers crashes to stdout, and not to a separate file With this change it would be sufficient to look at CI console to see the failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316687 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py index 74a5f6ebda..6f4ef2824b 100755 --- a/utils/analyzer/SATestBuild.py +++ b/utils/analyzer/SATestBuild.py @@ -450,29 +450,21 @@ def checkBuild(SBOutputDir): len(Plists) return - # Create summary file to display when the build fails. - SummaryPath = os.path.join( - SBOutputDir, LogFolderName, FailuresSummaryFileName) - if (Verbose > 0): - print " Creating the failures summary file %s" % (SummaryPath,) - - with open(SummaryPath, "w+") as SummaryLog: - SummaryLog.write("Total of %d failures discovered.\n" % (TotalFailed,)) - if TotalFailed > NumOfFailuresInSummary: - SummaryLog.write("See the first %d below.\n" % ( - NumOfFailuresInSummary,)) + print "Error: analysis failed." + print "Total of %d failures discovered." % TotalFailed + if TotalFailed > NumOfFailuresInSummary: + print "See the first %d below.\n" % NumOfFailuresInSummary # TODO: Add a line "See the results folder for more." - Idx = 0 - for FailLogPathI in Failures: - if Idx >= NumOfFailuresInSummary: - break - Idx += 1 - SummaryLog.write("\n-- Error #%d -----------\n" % (Idx,)) - with open(FailLogPathI, "r") as FailLogI: - shutil.copyfileobj(FailLogI, SummaryLog) + Idx = 0 + for FailLogPathI in Failures: + if Idx >= NumOfFailuresInSummary: + break + Idx += 1 + print "\n-- Error #%d -----------\n" % Idx + with open(FailLogPathI, "r") as FailLogI: + shutil.copyfileobj(FailLogI, sys.stdout) - print "Error: analysis failed. See ", SummaryPath sys.exit(1)