Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: scripts/travis-build.sh

Issue 2078283002: travis: add coverity scan integration (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: fix comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/travis-build.sh
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
index e994fe7b4f003786922aac7f46eed1a51c678651..6d16e14ec3364c4282ae7009b5531081c7597a6e 100755
--- a/scripts/travis-build.sh
+++ b/scripts/travis-build.sh
@@ -19,6 +19,26 @@ setup_env() {
export JOBS=$(( $NCPUS < 4 ? $NCPUS : 4 ))
}
+# We have to do this by hand rather than use the coverity addon because of
+# matrix explosion: https://github.com/travis-ci/travis-ci/issues/1975
+coverity_scan() {
+ if [ "${TRAVIS_JOB_NUMBER##*.}" != "1" ] || \
+ [ -n "${TRAVIS_TAG}" ] || \
+ [ "${TRAVIS_PULL_REQUEST}" = "true" ]
+ then
+ echo "Skipping coverity scan."
+ return
+ fi
+
+ export COVERITY_SCAN_PROJECT_NAME="${TRAVIS_REPO_SLUG}"
+ export COVERITY_SCAN_NOTIFICATION_EMAIL="google-breakpad-dev@googlegroups.com"
+ export COVERITY_SCAN_BUILD_COMMAND="build"
+ export COVERITY_SCAN_BUILD_COMMAND_PREPEND="git clean -q -x -d -f; git checkout -f"
+ export COVERITY_SCAN_BRANCH_PATTERN="master"
+
+ curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || :
+}
+
# Do an in-tree build and make sure tests pass.
build() {
./configure
@@ -38,6 +58,10 @@ main() {
setup_env
build
build_out_of_tree
+
+ # Do scans last as they like to dirty the tree and some tests
+ # expect a clean tree (like code style checks).
+ coverity_scan
}
main "$@"
« no previous file with comments | « README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698