coverity_scan:
project:
name: "siemens/jailhouse"
- description: "Build submitted via Travis CI"
notification_email: jan.kiszka@siemens.com
- build_command_prepend: "cp ci/jailhouse-config-x86.h hypervisor/include/jailhouse/config.h"
- build_command: "make KDIR=ci/linux/build-x86"
+ build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/ci/coverity-scan-build.sh
+ build_command_prepend: "cov-configure --comptype gcc --compiler arm-linux-gnueabihf-gcc --template"
+ build_command: "unused"
branch_pattern: coverity_scan
CONFIGS="x86 banana-pi vexpress"
+PREFIX=
+if [ "$1" == "--cov" ]; then
+ export COVERITY_UNSUPPORTED=1
+ PREFIX="cov-build --append-log --dir $2 $3"
+fi
+
for CONFIG in $CONFIGS; do
echo
echo "*** Building configuration $CONFIG ***"
;;
esac
+ $PREFIX make KDIR=ci/linux/build-$CONFIG ARCH=$ARCH \
+ CROSS_COMPILE=$CROSS_COMPILE
+
+ # Keep the clean run out of sight for cov-build so that results are
+ # accumulated as far as possible. Multiple compilations of the same
+ # file will still leave only the last run in the results.
make KDIR=ci/linux/build-$CONFIG ARCH=$ARCH \
- CROSS_COMPILE=$CROSS_COMPILE clean all
+ CROSS_COMPILE=$CROSS_COMPILE clean
done
--- /dev/null
+#!/bin/bash
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2015
+#
+# Authors:
+# Jan Kiszka <jan.kiszka@siemens.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2. See
+# the COPYING file in the top-level directory.
+#
+
+curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh \
+ -o ci/travisci_build_coverity_scan.sh.orig
+
+# Patch the line that starts the build.
+# We need to control this step via our build script.
+sed 's/^COVERITY_UNSUPPORTED=1 cov-build --dir.*/ci\/build-all-configs.sh --cov \$RESULTS_DIR \$COV_BUILD_OPTIONS/' \
+ ci/travisci_build_coverity_scan.sh.orig > ci/travisci_build_coverity_scan.sh
+
+# Check if the patch applied, bail out if not.
+if diff -q ci/travisci_build_coverity_scan.sh.orig \
+ ci/travisci_build_coverity_scan.sh > /dev/null; then
+ echo "Unable to patch Coverity script!"
+ exit 1
+fi
+
+# Run the patched scanner script.
+. ci/travisci_build_coverity_scan.sh