Release v4.9237 - Ice Coffee :coffee:
[RRG-proxmark3.git] / covbuild.sh
blob2e18e677f49de445e6a9ff150493d6526f1ea78e
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 bootrom
21 cov-build --dir "$COVDIR" --no-generate-build-id --force make fullimage
23 #########################################
24 # Build client #
25 #########################################
26 # make sure to do client after ARM because Coverity retains one build info per file
27 # and we want the client-side of the common/ analysis
28 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD mfkey
29 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD nonce2key
30 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD client
32 #########################################
33 # Run tests #
34 #########################################
35 cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --test-capture ./pm3test.sh long
36 #cov-manage-emit --dir "$COVDIR" list-coverage-known
38 #########################################
39 # Import Git annotations (~ git blame) #
40 #########################################
41 cov-import-scm --dir "$COVDIR" --scm git --filename-regex "$PWD" --log ""$COVDIR"/cov-import-scm-log.txt"
43 post_build_hook