Repository: trafficserver Updated Branches: refs/heads/master 0ba0432a2 -> eaef556b1
* Eliminate CPPAPI builds from < 5.0.0 branch * Update a /latest link for clang reports * Exit with failure if clang analyzer finds errors Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/eaef556b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/eaef556b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/eaef556b Branch: refs/heads/master Commit: eaef556b15afc9f8acab427ac5ee8e4a0726ebe6 Parents: 0ba0432 Author: Leif Hedstrom <[email protected]> Authored: Wed Jul 23 08:33:48 2014 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Wed Jul 23 09:03:39 2014 -0600 ---------------------------------------------------------------------- ci/jenkins/bin/clang-analyzer.sh | 33 ++++++++++++++++++++++++++++++--- ci/jenkins/bin/in_tree.sh | 6 +++++- 2 files changed, 35 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eaef556b/ci/jenkins/bin/clang-analyzer.sh ---------------------------------------------------------------------- diff --git a/ci/jenkins/bin/clang-analyzer.sh b/ci/jenkins/bin/clang-analyzer.sh index 6f6eb9c..0a5cc1b 100755 --- a/ci/jenkins/bin/clang-analyzer.sh +++ b/ci/jenkins/bin/clang-analyzer.sh @@ -16,10 +16,37 @@ # See the License for the specific language governing permissions and # limitations under the License. -cd "${WORKSPACE}/src" +checkers="-enable-checker alpha.unix.cstring.BufferOverlap \ + -enable-checker alpha.unix.PthreadLock\ + -enable-checker alpha.security.ArrayBoundV2 \ + -enable-checker alpha.core.BoolAssignment \ + -enable-checker alpha.core.CastSize \ + -enable-checker alpha.core.SizeofPtr" + +# These shenanigans are here to allow it to run both manually, and via Jenkins +test -z "${ATS_MAKE}" && ATS_MAKE="make" +test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src" + +# This disables LuaJIT for now, to avoid all the warnings from it. Maybe we need +# to talk to the author of it, or ideally, figure out how to get clang-analyzer to +# ignore them ? autoreconf -fi -./configure --enable-experimental-plugins --enable-cppapi -scan-build -o /home/jenkins/clang-analyzer --html-title="ATS master branch" ${ATS_MAKE} -j4 +./configure --enable-experimental-plugins --enable-cppapi --disable-luajit +scan-build ${checkers} --status-bugs -o /home/jenkins/clang-analyzer --html-title="ATS master branch" ${ATS_MAKE} -j5 +status=$? ${ATS_MAKE} distclean + +# Cleanup old reports (save the last 10 reports) +cd /home/jenkins/clang-analyzer || exit -1 +for old in $(\ls -1t | tail -n +11); do + rm -rf $old +done + +# Setup the symlink to the latest report +rm -f latest +ln -s $(\ls -1t | head -1) latest + +# Exit with the scan-build exit code (thanks to --status-bugs) +exit $status http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eaef556b/ci/jenkins/bin/in_tree.sh ---------------------------------------------------------------------- diff --git a/ci/jenkins/bin/in_tree.sh b/ci/jenkins/bin/in_tree.sh index 9f65116..2e4b1dc 100755 --- a/ci/jenkins/bin/in_tree.sh +++ b/ci/jenkins/bin/in_tree.sh @@ -18,6 +18,10 @@ # This does intentionally not run the regressions, it's primarily a "build" test +# Test if we should enable CPPAPI (only 5.0 and later for now) +enable_cppapi="--enable-cppapi" +test "${JOB_NAME#*-4.2.x}" != "${JOB_NAME}" && enable_cppapi="" + cd "${WORKSPACE}/src" autoreconf -fi @@ -25,7 +29,7 @@ autoreconf -fi --enable-ccache \ --enable-werror \ --enable-experimental-plugins \ - --enable-cppapi \ + ${enable_cppapi} \ --enable-example-plugins \ --enable-test-tools
