summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2019-10-29 19:07:15 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2019-10-29 19:38:54 +0000
commitd6fcb5db813c6ca43f31e08040de4cfa9c4959cb (patch)
tree5e1b6ebe3488e9640dc7bd89cd2b985d532d0260
parent644ee2546102f9aa12b11c28b3c5e80b62beb157 (diff)
downloadsystemd-coverity-python.tar.gz
coverity: replace python with jqcoverity-python
Judging by https://travis-ci.org/systemd/systemd/jobs/604425785 (where the script failed with "tools/coverity.sh: line 45: python: command not found") python-unversioned-command is no longer installed by default with python2. Given that it's not the first time python has vanished and it's not clear what exactly should be installed to make sure it's there, let's just use jq instead.
-rwxr-xr-xtools/coverity.sh6
-rwxr-xr-xtravis-ci/managers/fedora.sh2
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/coverity.sh b/tools/coverity.sh
index e32f5b3993..8edce065ca 100755
--- a/tools/coverity.sh
+++ b/tools/coverity.sh
@@ -42,11 +42,11 @@ if [ "$AUTH_RES" = "Access denied" ]; then
echo -e "\033[33;1mCoverity Scan API access denied. Check COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN.\033[0m"
exit 1
else
- AUTH=`echo $AUTH_RES | python -c "import sys, json; print(json.load(sys.stdin)['upload_permitted'])"`
- if [ "$AUTH" = "True" ]; then
+ AUTH=`echo $AUTH_RES | jq .upload_permitted`
+ if [ "$AUTH" = "true" ]; then
echo -e "\033[33;1mCoverity Scan analysis authorized per quota.\033[0m"
else
- WHEN=`echo $AUTH_RES | python -c "import sys, json; print(json.load(sys.stdin)['next_upload_permitted_at'])"`
+ WHEN=`echo $AUTH_RES | jq .next_upload_permitted_at`
echo -e "\033[33;1mCoverity Scan analysis NOT authorized until $WHEN.\033[0m"
exit 1
fi
diff --git a/travis-ci/managers/fedora.sh b/travis-ci/managers/fedora.sh
index 38cb3d3158..6e81d14b33 100755
--- a/travis-ci/managers/fedora.sh
+++ b/travis-ci/managers/fedora.sh
@@ -16,7 +16,7 @@ DOCKER_EXEC="${DOCKER_EXEC:-docker exec -it $CONT_NAME}"
DOCKER_RUN="${DOCKER_RUN:-docker run}"
REPO_ROOT="${REPO_ROOT:-$PWD}"
ADDITIONAL_DEPS=(dnf-plugins-core
- python2 iputils
+ jq iputils
hostname libasan
python3-pyparsing
python3-evdev