Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LDIF 1.47 KB | None | 0 0
  1. diff --git a/ci/jenkins/bin/clang-analyzer.sh b/ci/jenkins/bin/clang-analyzer.sh
  2. index 81e6ba4d8..d5f4aac5f 100755
  3. --- a/ci/jenkins/bin/clang-analyzer.sh
  4. +++ b/ci/jenkins/bin/clang-analyzer.sh
  5. @@ -25,6 +25,7 @@
  6.  LLVM_BASE=${LLVM:-/opt/llvm}
  7.  NPROCS=${NPROCS:-$(getconf _NPROCESSORS_ONLN)}
  8.  NOCLEAN=${NOCLEAN:-}
  9. +OUTPUT_BASE=${OUTPUT_BASE:-/home/jenkins/clang-analyzer}
  10.  
  11.  # Options
  12.  options="--status-bugs --keep-empty"
  13. @@ -43,12 +44,16 @@ checkers="-enable-checker alpha.unix.cstring.BufferOverlap \
  14.  test -z "${ATS_MAKE}" && ATS_MAKE="make"
  15.  test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src"
  16.  
  17. -# Check to see if this is a Github PR build (so not a github branch per-se)
  18. -test "${JOB_NAME#*-github}" != "${JOB_NAME}" && ATS_BRANCH="github"
  19. -
  20.  # Where to store the results, special case for the CI
  21.  output="/tmp"
  22. -test -w "/home/jenkins/clang-analyzer/${ATS_BRANCH}" && output="/home/jenkins/clang-analyzer/${ATS_BRANCH}"
  23. +test -w "${OUTPUT_BASE}/${ATS_BRANCH}" && output="${OUTPUT_BASE}/${ATS_BRANCH}"
  24. +
  25. +# Check to see if this is a Github PR build (so not a github branch per-se)
  26. +if [ "${JOB_NAME#*-github}" != "${JOB_NAME}" ]; then
  27. +    output="${OUTPUT_BASE}/${ATS_BRANCH}/${ghprbPullId}"
  28. +    [ ! -d "${OUTPUT_BASE}/${ATS_BRANCH}/${ghprbPullId}"] && mkdir "${OUTPUT_BASE}/${ATS_BRANCH}/${ghprbPullId}"
  29. +    ATS_BRANCH="github"
  30. +fi
  31.  
  32.  # Tell scan-build to use clang as the underlying compiler to actually build
  33.  # source. If you don't do this, it will default to GCC.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement