[X2Go-Commits] [nx-libs] 06/429: travisci: Fix PVS job

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:35:59 CEST 2021


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 870a9491ca8ce2e9d984a5112afcf52bdf0b77f2
Author: Mario Trangoni <mjtrangoni at gmail.com>
Date:   Tue Jul 7 18:53:51 2020 +0200

    travisci: Fix PVS job
    
    Signed-off-by: Mario Trangoni <mjtrangoni at gmail.com>
---
 .pvs-studio.sh | 18 +++++++++++++-----
 1 file 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

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list