2020-02-18 07:49:29 +08:00
|
|
|
#!/usr/bin/env bash
|
2016-01-12 17:39:23 +08:00
|
|
|
|
2019-10-09 21:29:42 +08:00
|
|
|
set -e
|
|
|
|
. .coverity.conf || exit 1
|
2016-01-12 17:39:23 +08:00
|
|
|
|
2019-10-09 21:29:42 +08:00
|
|
|
pre_build_hook
|
2016-10-05 23:58:11 +08:00
|
|
|
|
2019-10-10 20:52:51 +08:00
|
|
|
mkdir -p "$COVDIR"
|
2019-10-09 21:29:42 +08:00
|
|
|
make clean
|
2019-10-10 20:52:51 +08:00
|
|
|
cov-build --dir "$COVDIR" --initialize
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Build Host prerequisites #
|
|
|
|
#########################################
|
|
|
|
cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD fpga_compress
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Build ARM, no test coverage #
|
|
|
|
#########################################
|
|
|
|
cov-build --dir "$COVDIR" --no-generate-build-id --force make bootrom
|
|
|
|
cov-build --dir "$COVDIR" --no-generate-build-id --force make fullimage
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Build client #
|
|
|
|
#########################################
|
2019-10-09 21:29:42 +08:00
|
|
|
# make sure to do client after ARM because Coverity retains one build info per file
|
|
|
|
# and we want the client-side of the common/ analysis
|
2019-10-10 20:52:51 +08:00
|
|
|
cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD mfkey
|
|
|
|
cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD nonce2key
|
|
|
|
cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --no-generate-build-id --force make CC=$HOSTCC CXX=$HOSTCXX LD=$HOSTLD client
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Run tests #
|
|
|
|
#########################################
|
2020-05-22 23:47:30 +08:00
|
|
|
cov-build --dir "$COVDIR" --c-coverage=gcov --no-network-coverage --test-capture tools/pm3_tests.sh --long
|
2019-10-10 20:52:51 +08:00
|
|
|
#cov-manage-emit --dir "$COVDIR" list-coverage-known
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Import Git annotations (~ git blame) #
|
|
|
|
#########################################
|
|
|
|
cov-import-scm --dir "$COVDIR" --scm git --filename-regex "$PWD" --log ""$COVDIR"/cov-import-scm-log.txt"
|
2019-10-09 21:29:42 +08:00
|
|
|
|
|
|
|
post_build_hook
|