[analyzer] [tests] Create a directory for the log file

llvm-svn: 326408
This commit is contained in:
George Karpenkov 2018-03-01 02:18:54 +00:00
parent 86ed8e5830
commit dc0abcb87b
1 changed files with 2 additions and 0 deletions

View File

@ -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