Skip to content

Commit 545a5ab

Browse files
committed
[CI] Issue: HPCINFRA-3898 coverity agressiveness and exclude files
Due to PR #312 currently the cov.sh script does not calculate the number of errors from the scan correctly (the cov-format-errors command fails), this is due to --exclude-files flag being unique (cant use it twice). Combine both exclude-files flags to one regex Add -o pipefail so the task will fail if cov-format fails (failiure was masked by the pipe commands) Change --aggressiveness-level to medium Signed-off-by: NirWolfer <[email protected]>
1 parent 1ccffc5 commit 545a5ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/jenkins_tests/cov.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ eval "cov-manage-emit --config ${cov_dir}/coverity_config.xml --dir ${cov_build}
4040
sleep 1
4141

4242
eval "cov-analyze --config ${cov_dir}/coverity_config.xml \
43-
--all --aggressiveness-level low \
43+
--all --aggressiveness-level medium \
4444
--enable-fnptr --fnptr-models --paths 20000 \
4545
--disable-parse-warnings \
4646
--dir ${cov_build}"
@@ -56,14 +56,14 @@ if [[ "${do_coverity_snapshot}" == true ]]; then
5656
rc=$(($rc+$?))
5757
fi
5858

59-
set -eE
59+
set -eEo pipefail
6060

6161
# Excluded files for the local report generated by command "cov-format-errors":
6262
# * /usr/include/.*$ (all standard library issues can't be fixed)
6363
# * ${WORKSPACE}/third_party/.* (third party code)
6464

6565
# shellcheck disable=SC2001
66-
nerrors=$(cov-format-errors --exclude-files '/usr/include/.*$' --exclude-files '${WORKSPACE}/third_party/.*$' \
66+
nerrors=$(cov-format-errors --exclude-files "(/usr/include/.*$ | ${WORKSPACE}/third_party/.*$)" \
6767
--dir $cov_build --html-output "$cov_build/output/errors" | awk '/Processing [0-9]+ errors?/ { print $2 }')
6868
rc=$((rc + nerrors))
6969

0 commit comments

Comments
 (0)