From a197cc5e04c778022a78c010a22c9602591b7c2b Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Mon, 12 Mar 2018 09:53:07 -0700 Subject: [PATCH] Fail the Coverity build if their script cannot be downloaded If curl encounters an error trying to download the Coverity build script (as seems to be happening at the moment due to SSL issues), we will not be notified since the pipe swallows the error code. This is not ideal, so this commit updates the Travis build steps to use a slightly more contrived construction which will get and then execute the script as independent steps. Also, to ensure curl returns an error code even in less-severe cases (e.g. a basic 404 "Not Found") we add the '-f' option. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 385c012a..bc3f492b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,5 +38,5 @@ before_script: script: - if [[ x"$TRAVIS_EVENT_TYPE" = "xcron" ]]; then export DO_COVERITY="YES"; fi - - if [[ x"$BUILDTYPE" = "xcoverity" && x"$DO_COVERITY" = "xYES" ]]; then curl -s "$COVERITY_URL" | bash; fi + - if [[ x"$BUILDTYPE" = "xcoverity" && x"$DO_COVERITY" = "xYES" ]]; then COVERITY_SCRIPT=$(curl -fs "$COVERITY_URL") && echo "$COVERITY_SCRIPT" | bash; fi - if [[ x"$BUILDTYPE" != "xcoverity" ]]; then make CFLAGS="$CFLAGS" && make check; fi