style
[RRG-proxmark3.git] / covbuild.sh
blobf3fbee6bae6ea139d0e3adb4fce56d00c9c2993b
1 #!/usr/bin/env bash
3 set -e
4 . .coverity.conf || exit 1
6 pre_build_hook
8 mkdir -p "$COVDIR"
9 make clean
10 cov-build --dir "$COVDIR" --initialize
12 #########################################
13 # Build Host prerequisites #
14 #########################################
15 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD fpga_compress
17 #########################################
18 # Build ARM, no test coverage #
19 #########################################
20 cov-build --dir "$COVDIR" --no-generate-build-id --force make recovery
22 #########################################
23 # Build client #
24 #########################################
25 # make sure to do client after ARM because Coverity retains one build info per file
26 # and we want the client-side of the common/ analysis
27 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD mfkey
28 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD nonce2key
29 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD mf_nonce_brute
30 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD mfd_aes_brute
31 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD client
33 #########################################
34 # Run tests #
35 #########################################
36 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --test-capture tools/pm3_tests.sh --long
37 #cov-manage-emit --dir "$COVDIR" list-coverage-known
39 #########################################
40 # Import Git annotations (~ git blame) #
41 #########################################
42 cov-import-scm --dir "$COVDIR" --scm git --filename-regex "$PWD" --log ""$COVDIR"/cov-import-scm-log.txt"
44 post_build_hook