[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 005/115] run-coverity-scan: add --no-update-tools option
From: |
Paolo Bonzini |
Subject: |
[PULL 005/115] run-coverity-scan: add --no-update-tools option |
Date: |
Thu, 11 Jun 2020 15:42:59 -0400 |
Provide a quick way to skip building the container while we figure out how
to get caching right.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/coverity-scan/run-coverity-scan | 37 +++++++++++++++----------
1 file changed, 23 insertions(+), 14 deletions(-)
diff --git a/scripts/coverity-scan/run-coverity-scan
b/scripts/coverity-scan/run-coverity-scan
index e926623b3b..bc9e12670b 100755
--- a/scripts/coverity-scan/run-coverity-scan
+++ b/scripts/coverity-scan/run-coverity-scan
@@ -33,6 +33,7 @@
# --docker-engine : specify the container engine to use (docker/podman/auto);
# implies --docker
# --update-tools-only : update the cached copy of the tools, but don't run
them
+# --no-update-tools : do not update the cached copy of the tools
# --tokenfile : file to read Coverity token from
# --version ver : specify version being analyzed (default: ask git)
# --description desc : specify description of this version (default: ask git)
@@ -130,7 +131,7 @@ update_coverity_tools () {
# Check user-provided environment variables and arguments
DRYRUN=no
-UPDATE_ONLY=no
+UPDATE=yes
DOCKER=no
while [ "$#" -ge 1 ]; do
@@ -139,9 +140,13 @@ while [ "$#" -ge 1 ]; do
shift
DRYRUN=yes
;;
+ --no-update-tools)
+ shift
+ UPDATE=no
+ ;;
--update-tools-only)
shift
- UPDATE_ONLY=yes
+ UPDATE=only
;;
--version)
shift
@@ -245,12 +250,12 @@ fi
PROJNAME=QEMU
TARBALL=cov-int.tar.xz
-if [ "$UPDATE_ONLY" = yes ] && [ "$DOCKER" = yes ]; then
+if [ "$UPDATE" = only ] && [ "$DOCKER" = yes ]; then
echo "Combining --docker and --update-only is not supported"
exit 1
fi
-if [ "$UPDATE_ONLY" = yes ]; then
+if [ "$UPDATE" = only ]; then
# Just do the tools update; we don't need to check whether
# we are in a source tree or have upload rights for this,
# so do it before some of the command line and source tree checks.
@@ -293,7 +298,6 @@ fi
# Run ourselves inside docker if that's what the user wants
if [ "$DOCKER" = yes ]; then
- # build docker container including the coverity-scan tools
# Put the Coverity token into a temporary file that only
# we have read access to, and then pass it to docker build
# using a volume. A volume is enough for the token not to
@@ -308,14 +312,17 @@ if [ "$DOCKER" = yes ]; then
echo "Created temporary directory $SECRETDIR"
SECRET="$SECRETDIR/token"
echo "$COVERITY_TOKEN" > "$SECRET"
- echo "Building docker container..."
- # TODO: This re-downloads the tools every time, rather than
- # caching and reusing the image produced with the downloaded tools.
- # Not sure why.
- tests/docker/docker.py --engine ${DOCKER_ENGINE} build \
- -t coverity-scanner -f
scripts/coverity-scan/coverity-scan.docker \
- -v "$SECRETDIR:/work" \
- --extra-files scripts/coverity-scan/run-coverity-scan
+ if [ "$UPDATE" != no ]; then
+ # build docker container including the coverity-scan tools
+ echo "Building docker container..."
+ # TODO: This re-downloads the tools every time, rather than
+ # caching and reusing the image produced with the downloaded tools.
+ # Not sure why.
+ tests/docker/docker.py --engine ${DOCKER_ENGINE} build \
+ -t coverity-scanner -f
scripts/coverity-scan/coverity-scan.docker \
+ -v "$SECRETDIR:/work" \
+ --extra-files scripts/coverity-scan/run-coverity-scan
+ fi
echo "Archiving sources to be analyzed..."
./scripts/archive-source.sh "$SECRETDIR/qemu-sources.tgz"
if [ "$DRYRUN" = yes ]; then
@@ -350,7 +357,9 @@ fi
check_upload_permissions
-update_coverity_tools
+if [ "$UPDATE" != no ]; then
+ update_coverity_tools
+fi
TOOLBIN="$(cd "$COVERITY_TOOL_BASE" && echo
$PWD/coverity_tool/cov-analysis-*/bin)"
--
2.26.2
- [PULL 020/115] i386:pc: whitelist dynamic vmbus-bridge, (continued)
- [PULL 020/115] i386:pc: whitelist dynamic vmbus-bridge, Paolo Bonzini, 2020/06/11
- [PULL 028/115] hw/i386/vmport: Set EAX to -1 on failed and unsupported commands, Paolo Bonzini, 2020/06/11
- [PULL 023/115] target/i386: Fix the CPUID leaf CPUID_Fn80000008, Paolo Bonzini, 2020/06/11
- [PULL 029/115] hw/i386/vmport: Introduce vmware-vmx-version property, Paolo Bonzini, 2020/06/11
- [PULL 012/115] qom/object: Fix object_child_foreach_recursive() return value, Paolo Bonzini, 2020/06/11
- [PULL 027/115] hw/i386/vmport: Propagate IOPort read to vCPU EAX register, Paolo Bonzini, 2020/06/11
[PULL 005/115] run-coverity-scan: add --no-update-tools option,
Paolo Bonzini <=
[PULL 033/115] hw/i386/vmport: Add support for CMD_GETBIOSUUID, Paolo Bonzini, 2020/06/11
[PULL 009/115] vl.c: run preconfig loop before creating default RAM backend, Paolo Bonzini, 2020/06/11
[PULL 032/115] hw/i386/vmport: Define enum for all commands, Paolo Bonzini, 2020/06/11
[PULL 013/115] target/i386: Fix OUTL debug output, Paolo Bonzini, 2020/06/11
[PULL 036/115] i386/cpu: Store LAPIC bus frequency in CPU structure, Paolo Bonzini, 2020/06/11
[PULL 039/115] accel: Move Xen accelerator code under accel/xen/, Paolo Bonzini, 2020/06/11
[PULL 026/115] hw/i386/vmport: Add device properties, Paolo Bonzini, 2020/06/11
[PULL 051/115] target/i386: implement special cases for fxtract, Paolo Bonzini, 2020/06/11
[PULL 056/115] exec: Let address_space_read/write_cached() propagate MemTxResult, Paolo Bonzini, 2020/06/11
[PULL 038/115] hw/i386/vmport: Assert vmport initialized before registering commands, Paolo Bonzini, 2020/06/11