]> granicus.if.org Git - clang/commitdiff
[Analyzer] [Tests] Write analyzers crashes to stdout, and not to a separate file
authorGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 26 Oct 2017 19:00:22 +0000 (19:00 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 26 Oct 2017 19:00:22 +0000 (19:00 +0000)
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

utils/analyzer/SATestBuild.py

index 74a5f6ebdab980e51811f3b7475c9ee6fd98e1a5..6f4ef2824b0459928bc7f88d2a2169306cf9c9e2 100755 (executable)
@@ -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)