diff options
author | Evegeny Vereshchagin <evvers@ya.ru> | 2018-06-05 08:31:41 +0200 |
---|---|---|
committer | Evegeny Vereshchagin <evvers@ya.ru> | 2018-06-07 19:49:54 +0200 |
commit | 3b8e98818df563002c6c81107dc2085058ca4233 (patch) | |
tree | d22b9774ffd65d153929487d488f3149464c5815 /tools/coverity.sh | |
parent | update TODO (diff) | |
download | systemd-3b8e98818df563002c6c81107dc2085058ca4233.tar.xz systemd-3b8e98818df563002c6c81107dc2085058ca4233.zip |
coverity.sh: check that coverity responds with 200
This is mostly inspired by https://github.com/pmem/pmdk/commit/7b103fd2dd54b2e5974f71fb65c81ab3713c12c5
Closes https://github.com/systemd/systemd/issues/9186.
Diffstat (limited to 'tools/coverity.sh')
-rwxr-xr-x | tools/coverity.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/coverity.sh b/tools/coverity.sh index 3e8d874728..561d127d1e 100755 --- a/tools/coverity.sh +++ b/tools/coverity.sh @@ -1,5 +1,10 @@ #!/bin/env bash +# The official unmodified version of the script can be found at +# https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh + +set -e + # Declare build command COVERITY_SCAN_BUILD_COMMAND="ninja -C cov-build" @@ -135,8 +140,12 @@ _upload() --form version=$SHA \ --form description="Travis CI build" \ $UPLOAD_URL) + printf "\033[33;1mThe response is\033[0m\n%s\n" "$response" status_code=$(echo "$response" | sed -n '$p') - if [ "$status_code" != "201" ]; then + # Coverity Scan used to respond with 201 on successfully receieving analysis results. + # Now for some reason it sends 200 and may change back in the foreseeable future. + # See https://github.com/pmem/pmdk/commit/7b103fd2dd54b2e5974f71fb65c81ab3713c12c5 + if [ "$status_code" != "200" ]; then TEXT=$(echo "$response" | sed '$d') echo -e "\033[33;1mCoverity Scan upload failed: $TEXT.\033[0m" exit 1 |