add cppcheck to travis

This commit is contained in:
Paul Jimenez 2019-01-16 19:50:52 -05:00 committed by Nicolas Stalder
parent a72f5029dc
commit 7bd5f29a79
2 changed files with 11 additions and 3 deletions

View File

@ -7,6 +7,7 @@ addons:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
packages: packages:
- gcc-7 - gcc-7
- cppcheck
script: script:
- export CC=gcc-7 - export CC=gcc-7
- make test - make test

View File

@ -45,9 +45,6 @@ cbor: $(LIBCBOR)
$(LIBCBOR): tinycbor/Makefile $(LIBCBOR): tinycbor/Makefile
cd tinycbor/ && $(MAKE) clean && $(MAKE) -j8 cd tinycbor/ && $(MAKE) clean && $(MAKE) -j8
test:
$(MAKE) -C . main
.PHONY: efm8prog .PHONY: efm8prog
efm8prog: efm8prog:
cd './targets/efm8\Keil 8051 v9.53 - Debug' && $(MAKE) all cd './targets/efm8\Keil 8051 v9.53 - Debug' && $(MAKE) all
@ -92,6 +89,16 @@ wink3: env3
fido2-test: env3 fido2-test: env3
env3/bin/python tools/ctap_test.py env3/bin/python tools/ctap_test.py
CPPCHECK_FLAGS=--quiet --error-exitcode=2
cppcheck:
cppcheck $(CPPCHECK_FLAGS) crypto/aes-gcm
cppcheck $(CPPCHECK_FLAGS) crypto/sha256
cppcheck $(CPPCHECK_FLAGS) fido2
cppcheck $(CPPCHECK_FLAGS) pc
test: main cppcheck
clean: clean:
rm -f *.o main.exe main $(obj) rm -f *.o main.exe main $(obj)
rm -rf env2 env3 rm -rf env2 env3