2020before_install :
2121# install needed deps
2222 - travis_retry sudo apt-get update -qq
23- - travis_retry sudo apt-get install -qq python3-pip qt5-default qt5-qmake qtbase5-dev qtcreator qttools5-dev qttools5-dev-tools libxml2-utils libpcre3 gdb unzip wx-common xmlstarlet python3-dev liblua5.3-dev libcurl3 libcairo2-dev libsigc++-2.0-dev tidy libopencv-dev libz3-dev
23+ - travis_retry sudo apt-get install -qq python3-pip libxml2-utils libpcre3 gdb unzip wx-common xmlstarlet python3-dev liblua5.3-dev libcurl3 libcairo2-dev libsigc++-2.0-dev tidy libopencv-dev libz3-dev
2424# Python 2 modules
2525 - travis_retry python2 -m pip install --user pytest==4.6.4
2626 - travis_retry python2 -m pip install --user pylint
@@ -44,36 +44,8 @@ matrix:
4444 allow_failures :
4545 - name : " rerun dmake?"
4646 compiler : clang
47- - name : " make ubuntu 14.04 trusty"
4847# defined extra jobs that run besides what is configured in the build matrix
4948 include :
50- # -fsanitize=undefined
51- - name : " undefined behaviour sanitizers"
52- compiler : gcc
53- script :
54- - CXXFLAGS="-fsanitize=undefined -fno-sanitize-recover=all -Og -g3" make cppcheck check checkcfg -j 2 -s
55- # -fsanitize=address
56- - name : " address sanitizers"
57- compiler : gcc
58- script :
59- - CXXFLAGS="-fsanitize=address -Og -g3" make cppcheck check checkcfg -j 2 -s
60-
61- # bug hunting
62- - name : " bug hunting"
63- compiler : gcc
64- script :
65- - make clean
66- - make USE_Z3=yes -j2 all
67- - ./testrunner TestExprEngine
68- - python3 test/bug-hunting/cve.py
69- - git clone https://github.com/regehr/itc-benchmarks.git ~/itc
70- - python3 test/bug-hunting/itc.py
71- - mkdir ~/juliet
72- - curl https://samate.nist.gov/SARD/testsuites/juliet/Juliet_Test_Suite_v1.3_for_C_Cpp.zip -o ~/juliet/juliet.zip
73- - cd ~/juliet
74- - unzip -qq ~/juliet/juliet.zip
75- - cd -
76- - python3 test/bug-hunting/juliet.py
7749
7850# check a lot of stuff that only needs to be checked in a single configuration
7951 - name : " misc"
@@ -117,9 +89,6 @@ matrix:
11789# check --dump
11890 - ${CPPCHECK} test/testpreprocessor.cpp --dump
11991 - xmllint --noout test/testpreprocessor.cpp.dump
120- # check python syntax by compiling all addon scripts
121- - python -m compileall ./addons
122- - python3 -m compileall ./addons
12392# run pylint -- FIXME these are temporarily commented out because there is a syntax error in pylint
12493# - pylint --rcfile=pylintrc_travis addons/*.py
12594# - pylint --rcfile=pylintrc_travis htmlreport/cppcheck-htmlreport
@@ -171,20 +140,23 @@ matrix:
171140 - ${CPPCHECK} --dump namingng_test.c
172141 - python3 ../namingng.py --configfile ../naming.json --verify namingng_test.c.dump
173142 - cd ../..
174- # try CMake
175- - mkdir cmake.output
176- - cd cmake.output
177- - cmake -G "Unix Makefiles" -DBUILD_TESTS=On ..
178- - make -s -j2 check
179- - cd ..
180- # -funsigned-char
143+
144+ # bug hunting
145+ - name : " bug hunting"
146+ compiler : gcc
147+ script :
181148 - make clean
182- - make -s -j2 CXXFLAGS=-funsigned-char testrunner
183- - ./testrunner TestSymbolDatabase
184- # check .json files
185- - find . -name '*.json' | xargs -n 1 python3 -m json.tool > /dev/null
186- # build fuzz client
187- - make -s -j2 CXXFLAGS="-fsanitize=address" -C oss-fuzz fuzz-client
149+ - make USE_Z3=yes -j2 all
150+ - ./testrunner TestExprEngine
151+ - python3 test/bug-hunting/cve.py
152+ - git clone https://github.com/regehr/itc-benchmarks.git ~/itc
153+ - python3 test/bug-hunting/itc.py
154+ - mkdir ~/juliet
155+ - curl https://samate.nist.gov/SARD/testsuites/juliet/Juliet_Test_Suite_v1.3_for_C_Cpp.zip -o ~/juliet/juliet.zip
156+ - cd ~/juliet
157+ - unzip -qq ~/juliet/juliet.zip
158+ - cd -
159+ - python3 test/bug-hunting/juliet.py
188160
189161# check if dmake needs to be rerun (this job may fail)
190162 - name : " rerun dmake?"
@@ -208,15 +180,6 @@ matrix:
208180 - CXX=g++ CXXFLAGS="${ORIGINAL_CXXFLAGS}" make cppcheck check -j 2 -s
209181 - make clean
210182 - CXX=clang++ CXXFLAGS="${ORIGINAL_CXXFLAGS}" make cppcheck check -j 2 -s
211- # check if cppcheck builds on osx
212- - name : " make osx"
213- os : osx
214- before_install :
215- - true
216- script :
217- - CXX=g++ CXXFLAGS="${ORIGINAL_CXXFLAGS}" make cppcheck check -j 2 -s
218- - make clean
219- - CXX=clang++ CXXFLAGS="${ORIGINAL_CXXFLAGS}" make cppcheck check -j 2 -s
220183
221184script :
222185# fail the entire job as soon as one of the subcommands exits non-zero to save time and resources
@@ -233,40 +196,6 @@ script:
233196# compile cppcheck, default build
234197 - echo $CXXFLAGS
235198 - make -s check -j2
236- # compile gui
237- - cd gui
238- - qmake
239- - echo $CXXFLAGS
240- - make -s -j2
241- # building gui generates some more files that cppcheck can check, so check the repo *after* building gui
242- - cd ../
243- # self check lib/cli
244- - mkdir b1
245- - ${CPPCHECK} -q -j2 --template=gcc --cppcheck-build-dir=b1 -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --inconclusive --enable=style,performance,portability,warning,internal --exception-handling cli lib
246- # check gui with qt settings
247- - mkdir b2
248- - ${CPPCHECK} -q -j2 --template=gcc --cppcheck-build-dir=b2 -D__CPPCHECK__ -DQT_VERSION=0x050000 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=qt --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ --enable=style,performance,portability,warning,internal --exception-handling gui/*.cpp
249- # self check test and tools
250- - ${CPPCHECK} -q -j2 --template=gcc -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --inconclusive --enable=style,performance,portability,warning,internal --exception-handling test/*.cpp tools
251- # Build gui
252- - cd ./gui
253- # clean rebuild
254- - git clean -dfx .
255- # can't set this as env flags, so try again with HAVE_RULES=yes
256- - qmake HAVE_RULES=yes
257- - echo $CXXFLAGS
258- - make -s -j2
259- - cd ../
260- # Build gui/test
261- - cd gui/test/projectfile
262- - qmake && make -s -j2 && ./test-projectfile
263- - cd -
264- # Build triage
265- - cd ./tools/triage
266- - git clean -dfx .
267- - qmake
268- - make -s -j2
269- - cd ../../
270199# Testing cli
271200 - cp -R . ../cppcheck\ 2
272201 - cd ../cppcheck\ 2/test/cli # path with space
0 commit comments