diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/civetweb/resources/coverity_check.sh | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/civetweb/resources/coverity_check.sh')
-rwxr-xr-x | src/civetweb/resources/coverity_check.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/civetweb/resources/coverity_check.sh b/src/civetweb/resources/coverity_check.sh new file mode 100755 index 00000000..063d7c8c --- /dev/null +++ b/src/civetweb/resources/coverity_check.sh @@ -0,0 +1,60 @@ +#! /bin/sh + +# check if we use the correct directory +ls src/civetweb.c +if [ "$?" = "0" ]; then + echo "Building files for coverity check ..." +else + echo "Run this script from the root directory of project!" 1>&2 + echo "username@hostname:/somewhere/civetweb$ ./resources/coverity_check.sh" 1>&2 + exit 1 +fi + +# remove last build +rm -rf cov_build/ + +# copy files to build folder +mkdir cov_build +mkdir cov_build/src +mkdir cov_build/include +mkdir cov_build/resources + +cp Makefile cov_build/ +cp src/*.c cov_build/src/ +cp src/*.inl cov_build/src/ +cp include/civetweb.h cov_build/include/ +cp resources/Makefile.in-os cov_build/resources/ + +cd cov_build + +# new scan build +../../cov-analysis-linux64-8.7.0/bin/cov-build --dir cov-int make WITH_IPV6=1 WITH_WEBSOCKET=1 WITH_SERVER_STATS=1 + + +# pack build results for upload +tar czvf civetweb_coverity_check.tgz cov-int + +cd .. + +# check if the build was successful +echo +ls -la cov_build/civetweb_coverity_check.tgz + +if [ "$?" = "0" ]; then + echo "... done" + echo + echo "submit to https://scan.coverity.com/projects/bel2125-civetweb" + echo + echo "last commit was" + git log -n 1 + echo + echo +else + echo "No civetweb_coverity_check.tgz file" 1>&2 + echo + exit 1 +fi + +# return "ok" +exit 0 + |