Lines Matching +full:- +full:- +full:disable +full:- +full:spice

1 #!/bin/sh -e
8 # See the COPYING file in the top-level directory.
10 # Copyright (c) 2017-2020 Linaro Limited
14 # run the (closed-source) coverity build tools, so don't
18 # tree, and that tree is a fresh clean one, because we do an in-tree
21 # regular expressions it uses; an out-of-tree build won't work for this.)
31 # --check-upload-only : return success if upload is possible
32 # --dry-run : run the tools, but don't actually do the upload
33 # --docker : create and work inside a container
34 # --docker-engine : specify the container engine to use (docker/podman/auto);
35 # implies --docker
36 # --update-tools-only : update the cached copy of the tools, but don't run them
37 # --no-update-tools : do not update the cached copy of the tools
38 # --tokenfile : file to read Coverity token from
39 # --version ver : specify version being analyzed (default: ask git)
40 # --description desc : specify description of this version (default: ask git)
41 # --srcdir : QEMU source tree to analyze (default: current working dir)
42 # --results-tarball : path to copy the results tarball to (default: don't
44 # --src-tarball : tarball to untar into src dir (default: none); this
47 # User-specifiable environment variables:
48 # COVERITY_TOKEN -- Coverity token (default: looks at your
50 # COVERITY_EMAIL -- the email address to use for uploads (default:
52 # COVERITY_BUILD_CMD -- make command (default: 'make -jN' where N is
54 # COVERITY_TOOL_BASE -- set to directory to put coverity tools
55 # (default: /tmp/coverity-tools)
58 # putting it in a file and using --tokenfile. Everything else has
70 …ttps://scan.coverity.com/api/upload_permitted --post-data "token=$COVERITY_TOKEN&project=$PROJNAME…
115 # build docker container including the coverity-scan tools
117 # TODO: This re-unpacks the tools every time, rather than caching
120 tests/docker/docker.py --engine ${DOCKER_ENGINE} build \
121 -t coverity-scanner -f scripts/coverity-scan/coverity-scan.docker \
122 --extra-files scripts/coverity-scan/run-coverity-scan \
131 mkdir -p "$COVERITY_TOOL_BASE"
135 …ttps://scan.coverity.com/download/cxx/linux64 --post-data "token=$COVERITY_TOKEN&project=$PROJNAME…
137 if ! cmp -s coverity_tool.md5 coverity_tool.md5.new; then
141 rm -rf coverity_tool coverity_tool.tgz
142 …t https://scan.coverity.com/download/cxx/linux64 --post-data "token=$COVERITY_TOKEN&project=$PROJN…
143 if ! (cat coverity_tool.md5.new; echo " coverity_tool.tgz") | md5sum -c --status; then
151 mkdir -p coverity_tool
158 rm -f coverity_tool.md5.new
167 # Check user-provided environment variables and arguments
173 while [ "$#" -ge 1 ]; do
175 --check-upload-only)
179 --dry-run)
183 --no-update-tools)
187 --update-tools-only)
191 --version)
193 if [ $# -eq 0 ]; then
194 echo "--version needs an argument"
200 --description)
202 if [ $# -eq 0 ]; then
203 echo "--description needs an argument"
209 --tokenfile)
211 if [ $# -eq 0 ]; then
212 echo "--tokenfile needs an argument"
218 --srcdir)
220 if [ $# -eq 0 ]; then
221 echo "--srcdir needs an argument"
227 --results-tarball)
229 if [ $# -eq 0 ]; then
230 echo "--results-tarball needs an argument"
236 --src-tarball)
238 if [ $# -eq 0 ]; then
239 echo "--src-tarball needs an argument"
245 --docker)
250 --docker-engine)
252 if [ $# -eq 0 ]; then
253 echo "--docker-engine needs an argument"
267 if [ -z "$COVERITY_TOKEN" ]; then
270 if [ -z "$COVERITY_TOKEN" ]; then
280 if [ -z "$COVERITY_BUILD_CMD" ]; then
282 COVERITY_BUILD_CMD="make -j$NPROC"
286 if [ -z "$COVERITY_TOOL_BASE" ]; then
287 echo "COVERITY_TOOL_BASE: using default /tmp/coverity-tools"
288 COVERITY_TOOL_BASE=/tmp/coverity-tools
291 if [ -z "$SRCDIR" ]; then
295 TARBALL=cov-int.tar.xz
302 if [ "$DOCKER" = yes ] && [ ! -z "$SRCTARBALL" ]; then
303 echo --update-tools-only --docker is incompatible with --src-tarball.
311 if [ ! -e "$SRCDIR" ]; then
317 if [ ! -z "$SRCTARBALL" ]; then
323 if ! [ -e "$SRCDIR/VERSION" ]; then
328 # Fill in defaults used by the non-update-only process
329 if [ -z "$VERSION" ]; then
330 VERSION="$(git describe --always HEAD)"
333 if [ -z "$DESCRIPTION" ]; then
334 DESCRIPTION="$(git rev-parse HEAD)"
337 if [ -z "$COVERITY_EMAIL" ]; then
340 if [ -z "$COVERITY_EMAIL" ]; then
359 SECRETDIR=$(mktemp -d)
360 if [ -z "$SECRETDIR" ]; then
364 trap 'rm -rf "$SECRETDIR"' INT TERM EXIT
369 ./scripts/archive-source.sh "$SECRETDIR/qemu-sources.tgz"
370 ARGS="--no-update-tools"
372 ARGS="$ARGS --dry-run"
378 if [ ! -z "$RESULTSTARBALL" ]; then
379 ARGS="$ARGS --results-tarball /work/cov-int.tar.xz"
381 # Arrange for this docker run to get access to the sources with -v.
384 tests/docker/docker.py run -it --env COVERITY_EMAIL --env COVERITY_BUILD_CMD \
385 -v "$SECRETDIR:/work" coverity-scanner \
386 ./run-coverity-scan --version "$VERSION" \
387 --description "$DESCRIPTION" $ARGS --tokenfile /work/token \
388 --srcdir /qemu --src-tarball /work/qemu-sources.tgz
389 if [ ! -z "$RESULTSTARBALL" ]; then
391 cp "$SECRETDIR/cov-int.tar.xz" "$RESULTSTARBALL"
397 TOOLBIN="$(cd "$COVERITY_TOOL_BASE" && echo $PWD/coverity_tool/cov-analysis-*/bin)"
399 if ! test -x "$TOOLBIN/cov-build"; then
400 echo "Couldn't find cov-build in the coverity build-tool directory??"
409 rm -rf +build
418 ../configure --disable-modules --enable-sdl --enable-gtk \
419 --enable-opengl --enable-vte --enable-gnutls \
420 --enable-nettle --enable-curses --enable-curl \
421 --audio-drv-list=oss,alsa,sdl,pa --enable-virtfs \
422 --enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-png \
423 --enable-xen --enable-brlapi \
424 --enable-linux-aio --enable-attr \
425 --enable-cap-ng --enable-trace-backends=log --enable-spice --enable-rbd \
426 --enable-libusb --enable-usb-redir \
427 --enable-libiscsi --enable-libnfs --enable-seccomp \
428 --enable-tpm --enable-libssh --enable-lzo --enable-snappy --enable-bzip2 \
429 --enable-numa --enable-rdma --enable-smartcard --enable-virglrenderer \
430 --enable-mpath --enable-glusterfs \
431 --enable-virtfs --enable-zstd
433 echo "Running cov-build..."
434 rm -rf cov-int
435 mkdir cov-int
436 cov-build --dir cov-int $COVERITY_BUILD_CMD
439 tar cvf - cov-int | xz > "$TARBALL"
441 if [ ! -z "$RESULTSTARBALL" ]; then
453 curl --form token="$COVERITY_TOKEN" --form email="$COVERITY_EMAIL" \
454 --form file=@"$TARBALL" --form version="$VERSION" \
455 --form description="$DESCRIPTION" \