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
+ branch_pattern: coverity_scan.*
CONFIGS="x86 banana-pi vexpress"
+# only build a specific config if the branch selects it
+if [ ${TRAVIS_BRANCH#coverity_scan-} != ${TRAVIS_BRANCH} ]; then
+ CONFIGS=${TRAVIS_BRANCH#coverity_scan-}
+fi
+
PREFIX=
if [ "$1" == "--cov" ]; then
export COVERITY_UNSUPPORTED=1
# 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
+ ci/travisci_build_coverity_scan.sh.orig > ci/travisci_build_coverity_scan.sh.step1
+
+# Path the branch name into the description.
+sed 's/^ --form description=.*/ --form description="Travis CI build (branch: \$TRAVIS_BRANCH)" \\/' \
+ ci/travisci_build_coverity_scan.sh.step1 > 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.step1 > /dev/null || \
+ diff -q ci/travisci_build_coverity_scan.sh.step1 \
ci/travisci_build_coverity_scan.sh > /dev/null; then
echo "Unable to patch Coverity script!"
exit 1