diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-09-06 16:12:41 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-09-06 16:12:41 +0000 |
commit | 1c840db980075f56e5747b5b636e319a26722fe3 (patch) | |
tree | 1ac69c7a2a142cd48cbcd0df0fdd2f97daddc919 /utils | |
parent | 906db27c335a65f568711f0d2d61da39c47ec77f (diff) | |
download | clang-1c840db980075f56e5747b5b636e319a26722fe3.tar.gz clang-1c840db980075f56e5747b5b636e319a26722fe3.tar.bz2 clang-1c840db980075f56e5747b5b636e319a26722fe3.tar.xz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/analyzer/SATestBuild.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py index eb7796431a..51bc6e2593 100755 --- a/utils/analyzer/SATestBuild.py +++ b/utils/analyzer/SATestBuild.py @@ -215,6 +215,7 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile): SBCommandFile = open(BuildScriptPath, "r") SBPrefix = "scan-build " + SBOptions + " " for Command in SBCommandFile: + Command = Command.strip() # If using 'make', auto imply a -jX argument # to speed up analysis. xcodebuild will # automatically use the maximum number of cores. |