Merge remote-tracking branch 'matthiaskrgr/travis'

This commit is contained in:
Matthias Krüger 2014-07-28 18:09:19 +02:00
commit bbd91fcfd3
2 changed files with 9 additions and 11 deletions

View File

@ -12,28 +12,25 @@ env:
matrix: matrix:
# special CXXFLAGS for maximum speed, overrides global CXXFLAGS, CHECK_CLANG is the var that controls if we download and check clang in that travis job # special CXXFLAGS for maximum speed, overrides global CXXFLAGS, CHECK_CLANG is the var that controls if we download and check clang in that travis job
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL" - CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL"
- MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1 - SRCDIR=build CHECK_CLANG=yes VERIFY=1
- SRCDIR=build CHECK_KERNEL=yes - CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL" MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1
matrix: matrix:
# do notify immediately about it when a job of a build fails. # do notify immediately about it when a job of a build fails.
fast_finish: true fast_finish: true
# exclude kernel checking with clang binary, not needed # exclude clang checking with clang binary, not needed
exclude: exclude:
- compiler: clang - compiler: clang
env: SRCDIR=build CHECK_KERNEL=yes env: SRCDIR=build CHECK_CLANG=yes VERIFY=1
# kernel check can time out during travis rush hour, so make failure of it less grave...
allow_failures:
- env: SRCDIR=build CHECK_KERNEL=yes
before_install: before_install:
# install needed deps # install needed deps
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils libpcre3 gdb - sudo apt-get install -qq python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils libpcre3 gdb unzip
script: script:
# download 3.14-rc6 kernel, compile cppcheck, run cppcheck on the kernel to look for crashes in cppcheck. if this is done, terminate build to prevent it from timing out # download clang git, compile cppcheck, run cppcheck on clang code to look for crashes in cppcheck. if this is done, terminate build
- if [[ "$CHECK_KERNEL" == "yes" ]] && [[ "$CC" == "gcc" ]]; then wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.tar.xz; mkdir kernel; tar -xJf linux-3.14.tar.xz -C kernel & make -j 4 & wait; touch /tmp/kernel.cppcheck; ./cppcheck kernel --max-configs=1 --exception-handling -j 2 |& tee /tmp/kernel.cppcheck; ! grep "process crashed with signal" /tmp/kernel.cppcheck; exit; fi - if [[ "$CHECK_CLANG" == "yes" ]] && [[ "$CC" == "gcc" ]]; then wget "https://github.com/llvm-mirror/clang/archive/0d9772d6c4fd0f69f7bdbb692768f07f9af2a3d0.zip" & make -j 4 & wait; unzip 0d9772d6c4fd0f69f7bdbb692768f07f9af2a3d0.zip > /dev/null; touch /tmp/clang.cppcheck; cd ./clang-0d9772d6c4fd0f69f7bdbb692768f07f9af2a3d0 ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling -iINPUTS -itest/CXX/temp/temp.decls/temp.mem/p5.cpp -itest/CodeGenCXX/mangle-alias-template.cpp -itest/Lexer/unicode.c -j 2 |& tee /tmp/clang.cppcheck; cd ../ ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/clang.cppcheck; exit; fi
# compile cppcheck, default build # compile cppcheck, default build
- make -j4 - make -j4
- make test -j4 - make test -j4
@ -43,7 +40,7 @@ script:
- make -j4 - make -j4
# building gui generates some more files that cppcheck can check, so check the repo *after* building gui # building gui generates some more files that cppcheck can check, so check the repo *after* building gui
- cd ../ - cd ../
# use same hack as for kernel to work around cppchecks broken exit status with -j 2 ; create file, tee everything to the file and stdout, grep for errors in the file # use same hack as for clang to work around cppchecks broken exit status with -j 2 ; create file, tee everything to the file and stdout, grep for errors in the file
- touch /tmp/cppcheck.cppcheck - touch /tmp/cppcheck.cppcheck
- ./cppcheck --error-exitcode=1 -Ilib --enable=style,performance,portability,warning,internal --exception-handling --suppressions-list=.travis_suppressions . -j 2 |& tee /tmp/cppcheck.cppcheck - ./cppcheck --error-exitcode=1 -Ilib --enable=style,performance,portability,warning,internal --exception-handling --suppressions-list=.travis_suppressions . -j 2 |& tee /tmp/cppcheck.cppcheck
- sh -c "! grep '^\[' /tmp/cppcheck.cppcheck" - sh -c "! grep '^\[' /tmp/cppcheck.cppcheck"

View File

@ -1,5 +1,6 @@
unusedPrivateFunction:test/testcmdlineparser.cpp unusedPrivateFunction:test/testcmdlineparser.cpp
redundantNextPrevious:test/testtoken.cpp redundantNextPrevious:test/testtoken.cpp
uselessAssignmentPtrArg:build/checkstl.cpp
*:gui/test* *:gui/test*
*:test/test.cxx *:test/test.cxx