[Analyzer] [Tests] Fixing typo from the previous commit.
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 27 Oct 2017 22:52:36 +0000 (22:52 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 27 Oct 2017 22:52:36 +0000 (22:52 +0000)
Can not open a non-existent file with r+.

llvm-svn: 316808

clang/utils/analyzer/SATestBuild.py

index ed700c0..3c694fb 100755 (executable)
@@ -374,7 +374,7 @@ def buildProject(Dir, SBOutputDir, ProjectBuildMode, IsReferenceBuild):
     os.makedirs(os.path.join(SBOutputDir, LogFolderName))
 
     # Build and analyze the project.
-    with open(BuildLogPath, "r+b") as PBuildLogFile:
+    with open(BuildLogPath, "wb+") as PBuildLogFile:
         if (ProjectBuildMode == 1):
             downloadAndPatch(Dir, PBuildLogFile)
             runCleanupScript(Dir, PBuildLogFile)