Author: george.karpenkov Date: Thu Oct 26 12:00:22 2017 New Revision: 316687
URL: http://llvm.org/viewvc/llvm-project?rev=316687&view=rev Log: [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. Modified: cfe/trunk/utils/analyzer/SATestBuild.py Modified: cfe/trunk/utils/analyzer/SATestBuild.py URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestBuild.py?rev=316687&r1=316686&r2=316687&view=diff ============================================================================== --- cfe/trunk/utils/analyzer/SATestBuild.py (original) +++ cfe/trunk/utils/analyzer/SATestBuild.py Thu Oct 26 12:00:22 2017 @@ -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) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits