2015-11-22 23:46:22 +01:00
|
|
|
#! /bin/sh
|
|
|
|
|
2017-02-12 20:59:28 +01:00
|
|
|
# check if we use the correct directory
|
2015-11-22 23:46:22 +01:00
|
|
|
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
|
2015-12-30 23:27:16 +01:00
|
|
|
echo "username@hostname:/somewhere/civetweb$ ./resources/coverity_check.sh" 1>&2
|
2015-11-22 23:46:22 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-02-12 20:59:28 +01:00
|
|
|
# remove last build
|
2017-04-18 21:23:32 +02:00
|
|
|
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/
|
2019-06-07 21:40:55 +02:00
|
|
|
cp src/civetweb.c cov_build/src/
|
|
|
|
cp src/main.c cov_build/src/
|
|
|
|
cp src/md5.inl cov_build/src/
|
|
|
|
cp src/sha1.inl cov_build/src/
|
2020-09-30 20:24:15 +02:00
|
|
|
cp src/response.inl cov_build/src/
|
|
|
|
cp src/timer.inl cov_build/src/
|
2022-02-17 19:52:50 +01:00
|
|
|
cp src/http2.inl cov_build/src/
|
2019-06-07 21:40:55 +02:00
|
|
|
cp src/handle_form.inl cov_build/src/
|
2021-04-06 07:30:39 +02:00
|
|
|
cp src/openssl_dl.inl cov_build/src/
|
2017-04-18 21:23:32 +02:00
|
|
|
cp include/civetweb.h cov_build/include/
|
|
|
|
cp resources/Makefile.in-os cov_build/resources/
|
|
|
|
|
|
|
|
cd cov_build
|
2015-11-22 23:46:22 +01:00
|
|
|
|
2017-02-12 20:59:28 +01:00
|
|
|
# new scan build
|
2022-02-17 19:52:50 +01:00
|
|
|
~/cov-analysis-linux64-2021.12.1/bin/cov-build --dir cov-int make WITH_IPV6=1 WITH_WEBSOCKET=1 WITH_SERVER_STATS=1 WITH_HTTP2=1 WITH_EXPERIMENTAL=1
|
2017-04-18 21:23:32 +02:00
|
|
|
|
2015-11-22 23:46:22 +01:00
|
|
|
|
2017-02-12 20:59:28 +01:00
|
|
|
# pack build results for upload
|
2015-12-30 23:27:16 +01:00
|
|
|
tar czvf civetweb_coverity_check.tgz cov-int
|
2015-11-22 23:46:22 +01:00
|
|
|
|
2017-04-18 21:23:32 +02:00
|
|
|
cd ..
|
|
|
|
|
2017-02-12 20:59:28 +01:00
|
|
|
# check if the build was successful
|
2015-12-30 23:27:16 +01:00
|
|
|
echo
|
2017-04-18 21:23:32 +02:00
|
|
|
ls -la cov_build/civetweb_coverity_check.tgz
|
2015-11-22 23:46:22 +01:00
|
|
|
|
|
|
|
if [ "$?" = "0" ]; then
|
|
|
|
echo "... done"
|
2017-05-19 00:25:16 +02:00
|
|
|
echo
|
|
|
|
echo "submit to https://scan.coverity.com/projects/bel2125-civetweb"
|
|
|
|
echo
|
|
|
|
echo "last commit was"
|
|
|
|
git log -n 1
|
|
|
|
echo
|
2015-12-30 23:27:16 +01:00
|
|
|
echo
|
2015-11-22 23:46:22 +01:00
|
|
|
else
|
2015-12-30 23:27:16 +01:00
|
|
|
echo "No civetweb_coverity_check.tgz file" 1>&2
|
|
|
|
echo
|
2015-11-22 23:46:22 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-02-12 20:59:28 +01:00
|
|
|
# return "ok"
|
2015-11-22 23:46:22 +01:00
|
|
|
exit 0
|
|
|
|
|