forked from OSchip/llvm-project
[analyzer] SATestBuild: strip trailing newlines from command file.
When running a make-based command, SATestBuild tries to append a -jN flag with an appropriate N to run the build in parallel. However, it failed to take into account that each line read includes a trailing newline (unless it is the last line of a file without a trailing newline), which resulted in the "-jN" appearing on a line on its own. llvm-svn: 190164
This commit is contained in:
parent
4e06e6e8c3
commit
7bd9186cdd
|
@ -215,6 +215,7 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile):
|
||||||
SBCommandFile = open(BuildScriptPath, "r")
|
SBCommandFile = open(BuildScriptPath, "r")
|
||||||
SBPrefix = "scan-build " + SBOptions + " "
|
SBPrefix = "scan-build " + SBOptions + " "
|
||||||
for Command in SBCommandFile:
|
for Command in SBCommandFile:
|
||||||
|
Command = Command.strip()
|
||||||
# If using 'make', auto imply a -jX argument
|
# If using 'make', auto imply a -jX argument
|
||||||
# to speed up analysis. xcodebuild will
|
# to speed up analysis. xcodebuild will
|
||||||
# automatically use the maximum number of cores.
|
# automatically use the maximum number of cores.
|
||||||
|
|
Loading…
Reference in New Issue