1
0
Fork 0
qemu/subprojects/libvfio-user/.github/workflows/coverity.sh
Daniel Baumann ea34ddeea6
Adding upstream version 1:10.0.2+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 14:27:05 +02:00

35 lines
865 B
Bash
Executable file

#!/bin/sh
set -e
set -v
if test -z "$COVERITY_TOKEN"
then
echo "COVERITY_TOKEN environment variable must be set"
exit 1
fi
if test -z "$COVERITY_EMAIL"
then
echo "COVERITY_EMAIL environment variable must be set"
exit 1
fi
GIT_SHA=$(git rev-parse --short HEAD)
curl -sS -L -o coverity.tar.gz \
-d "token=$COVERITY_TOKEN&project=nutanix%2Flibvfio-user" \
https://scan.coverity.com/download/cxx/linux64
tar xf coverity.tar.gz
meson build/coverity || (cat build/meson-logs/meson-log.txt && exit 1)
./cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build/coverity -v
tar czf coverity-results.tar.gz cov-int
curl --form token=$COVERITY_TOKEN \
--form email=$COVERITY_EMAIL \
--form file=@coverity-results.tar.gz \
--form version=$GIT_SHA \
https://scan.coverity.com/builds?project=nutanix%2Flibvfio-user