diff options
author | Mario Trangoni <mjtrangoni@gmail.com> | 2020-07-07 18:53:51 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-10-17 21:52:57 +0200 |
commit | 870a9491ca8ce2e9d984a5112afcf52bdf0b77f2 (patch) | |
tree | 46377a941fee36043a847d44b0d5f0c3185ef44a /.pvs-studio.sh | |
parent | bc68b4aad96fa1819842b43c95715d5f2598546d (diff) | |
download | nx-libs-870a9491ca8ce2e9d984a5112afcf52bdf0b77f2.tar.gz nx-libs-870a9491ca8ce2e9d984a5112afcf52bdf0b77f2.tar.bz2 nx-libs-870a9491ca8ce2e9d984a5112afcf52bdf0b77f2.zip |
travisci: Fix PVS job
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
Diffstat (limited to '.pvs-studio.sh')
-rw-r--r-- | .pvs-studio.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/.pvs-studio.sh b/.pvs-studio.sh index cf9f0d1ee..9e9f0370c 100644 --- a/.pvs-studio.sh +++ b/.pvs-studio.sh @@ -13,11 +13,19 @@ before_install() { build_script() { if [ "$PVS_ANALYZE" = "yes" ]; then - pvs-studio-analyzer credentials "${PVS_USERNAME}" "${PVS_KEY}" -o PVS-Studio.lic - pvs-studio-analyzer trace -- make -j2 - pvs-studio-analyzer analyze --quiet -j2 -l PVS-Studio.lic -o "PVS-Studio-${CC}.log" - plog-converter -a "GA:1,2" -t tasklist -o "PVS-Studio-${CC}.tasks" "PVS-Studio-${CC}.log" - cat "PVS-Studio-${CC}.tasks" + if [[ -z "${PVS_USERNAME}" ]]; then + echo '"PVS_USERNAME" environment variable not set' + exit 0 + elif [[ -z "${PVS_KEY}" ]]; then + echo '"PVS_KEY" environment variable not set' + exit 0 + else + pvs-studio-analyzer credentials -o "PVS-Studio.lic" "${PVS_USERNAME}" "${PVS_KEY}" + pvs-studio-analyzer trace -- make -j2 + pvs-studio-analyzer analyze --quiet -j2 --lic-file "PVS-Studio.lic" --output-file "PVS-Studio-${CC}.log" + plog-converter -a "GA:1,2" -t tasklist -o "PVS-Studio-${CC}.tasks" "PVS-Studio-${CC}.log" + cat "PVS-Studio-${CC}.tasks" + fi else make -j2 fi |