]> rtime.felk.cvut.cz Git - jailhouse.git/blob - ci/coverity-scan-build.sh
Enhance the benchmark code a little. Add image_end symbol.
[jailhouse.git] / ci / coverity-scan-build.sh
1 #!/bin/bash
2 #
3 # Jailhouse, a Linux-based partitioning hypervisor
4 #
5 # Copyright (c) Siemens AG, 2015
6 #
7 # Authors:
8 #  Jan Kiszka <jan.kiszka@siemens.com>
9 #
10 # This work is licensed under the terms of the GNU GPL, version 2.  See
11 # the COPYING file in the top-level directory.
12 #
13
14 curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh \
15         -o ci/travisci_build_coverity_scan.sh.orig
16
17 # Patch the line that starts the build.
18 # We need to control this step via our build script.
19 sed 's/^COVERITY_UNSUPPORTED=1 cov-build --dir.*/ci\/build-all-configs.sh --cov \$RESULTS_DIR \$COV_BUILD_OPTIONS/' \
20         ci/travisci_build_coverity_scan.sh.orig > ci/travisci_build_coverity_scan.sh.step1
21
22 # Path the branch name into the description.
23 sed 's/^  --form description=.*/  --form description="Travis CI build (branch: \$TRAVIS_BRANCH)" \\/' \
24         ci/travisci_build_coverity_scan.sh.step1 > ci/travisci_build_coverity_scan.sh
25
26 # Check if the patch applied, bail out if not.
27 if diff -q ci/travisci_build_coverity_scan.sh.orig \
28            ci/travisci_build_coverity_scan.sh.step1 > /dev/null || \
29    diff -q ci/travisci_build_coverity_scan.sh.step1 \
30            ci/travisci_build_coverity_scan.sh > /dev/null; then
31         echo "Unable to patch Coverity script!"
32         exit 1
33 fi
34
35 # Run the patched scanner script.
36 . ci/travisci_build_coverity_scan.sh