]> granicus.if.org Git - clang/commitdiff
[analyzer] [tests] Create a directory for the log file
authorGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 1 Mar 2018 02:18:54 +0000 (02:18 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 1 Mar 2018 02:18:54 +0000 (02:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326408 91177308-0d34-0410-b5e6-96231b3b80d8

utils/analyzer/SATestUpdateDiffs.py

index 8cda8d16b251cf1bf71f5d7a7d8dea39a5282b7b..92bbd83172efb9152fbd409728ac8f6c7ddcc281 100755 (executable)
@@ -35,6 +35,8 @@ def updateReferenceResults(ProjName, ProjBuildMode):
         sys.exit(1)
 
     BuildLogPath = SATestBuild.getBuildLogPath(RefResultsPath)
+    Dirname = os.path.dirname(os.path.abspath(BuildLogPath))
+    runCmd("mkdir -p '%s'" % Dirname)
     with open(BuildLogPath, "wb+") as PBuildLogFile:
         # Remove reference results: in git, and then again for a good measure
         # with rm, as git might not remove things fully if there are empty