diff options
| author | Devin Coughlin <dcoughlin@apple.com> | 2016-01-22 07:08:06 +0000 |
|---|---|---|
| committer | Devin Coughlin <dcoughlin@apple.com> | 2016-01-22 07:08:06 +0000 |
| commit | ab95cd27941f6947d37baf0363caf9f778490c92 (patch) | |
| tree | de45a52a9ce0542d955800116176572e8c3429dd | |
| parent | 08d1f2431d9a421e77960350e3126559e41b2493 (diff) | |
| download | bcm5719-llvm-ab95cd27941f6947d37baf0363caf9f778490c92.tar.gz bcm5719-llvm-ab95cd27941f6947d37baf0363caf9f778490c92.zip | |
[analyzer] Update SATestBuild.py to handle spaces in paths.
The Jenkins workspace on the new Green Dragon builder for the static analyzer has spaces
in its path.
llvm-svn: 258493
| -rwxr-xr-x | clang/utils/analyzer/SATestBuild.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/utils/analyzer/SATestBuild.py b/clang/utils/analyzer/SATestBuild.py index d0503c6389c..913b77bbf41 100755 --- a/clang/utils/analyzer/SATestBuild.py +++ b/clang/utils/analyzer/SATestBuild.py @@ -218,11 +218,11 @@ def runScript(ScriptPath, PBuildLogFile, Cwd): try: if Verbose == 1: print " Executing: %s" % (ScriptPath,) - check_call("chmod +x %s" % ScriptPath, cwd = Cwd, + check_call("chmod +x '%s'" % ScriptPath, cwd = Cwd, stderr=PBuildLogFile, stdout=PBuildLogFile, shell=True) - check_call(ScriptPath, cwd = Cwd, stderr=PBuildLogFile, + check_call("'%s'" % ScriptPath, cwd = Cwd, stderr=PBuildLogFile, stdout=PBuildLogFile, shell=True) except: @@ -261,7 +261,7 @@ def applyPatch(Dir, PBuildLogFile): print " Applying patch." try: - check_call("patch -p1 < %s" % (PatchfilePath), + check_call("patch -p1 < '%s'" % (PatchfilePath), cwd = PatchedSourceDirPath, stderr=PBuildLogFile, stdout=PBuildLogFile, @@ -286,7 +286,7 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile): SBCwd = os.path.join(Dir, PatchedSourceDirName) SBOptions = "--use-analyzer " + Clang + " " - SBOptions += "-plist-html -o " + SBOutputDir + " " + SBOptions += "-plist-html -o '" + SBOutputDir + "' " SBOptions += "-enable-checker " + AllCheckers + " " SBOptions += "--keep-empty " # Always use ccc-analyze to ensure that we can locate the failures @@ -376,8 +376,8 @@ def runAnalyzePreprocessed(Dir, SBOutputDir, Mode): raise Exception() # Build and call the analyzer command. - OutputOption = "-o " + os.path.join(PlistPath, FileName) + ".plist " - Command = CmdPrefix + OutputOption + FileName + OutputOption = "-o '%s.plist' " % os.path.join(PlistPath, FileName) + Command = CmdPrefix + OutputOption + ("'%s'" % FileName) LogFile = open(os.path.join(FailPath, FileName + ".stderr.txt"), "w+b") try: if Verbose == 1: @@ -406,14 +406,14 @@ def buildProject(Dir, SBOutputDir, ProjectBuildMode, IsReferenceBuild): # Clean up the log file. if (os.path.exists(BuildLogPath)) : - RmCommand = "rm " + BuildLogPath + RmCommand = "rm '%s'" % BuildLogPath if Verbose == 1: print " Executing: %s" % (RmCommand,) check_call(RmCommand, shell=True) # Clean up scan build results. if (os.path.exists(SBOutputDir)) : - RmCommand = "rm -r " + SBOutputDir + RmCommand = "rm -r '%s'" % SBOutputDir if Verbose == 1: print " Executing: %s" % (RmCommand,) check_call(RmCommand, shell=True) @@ -593,9 +593,9 @@ def updateSVN(Mode, ProjectsMap): Path = os.path.join(ProjName, getSBOutputDirName(True)) if Mode == "delete": - Command = "svn delete %s" % (Path,) + Command = "svn delete '%s'" % (Path,) else: - Command = "svn add %s" % (Path,) + Command = "svn add '%s'" % (Path,) if Verbose == 1: print " Executing: %s" % (Command,) |

