[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible system health: work around strangeness in bash

Holger Levsen gitlab at salsa.debian.org
Sat May 16 19:52:37 BST 2020



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
6f2da124 by Holger Levsen at 2020-05-16T20:51:58+02:00
reproducible system health: work around strangeness in bash

let VARIABLE=0 exits with an error...

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_system_health.sh


Changes:

=====================================
bin/reproducible_system_health.sh
=====================================
@@ -14,7 +14,7 @@
 ###
 ###
 
-DEBUG=true
+DEBUG=false
 . /srv/jenkins/bin/common-functions.sh
 common_init "$@"
 # common code for tests.reproducible-builds.org
@@ -40,10 +40,10 @@ for JOB in reproducible_* ; do
 	UNSTABLE=$(grep lastUnstableBuild $FILE|awk '{print $2}')
 	if [ "$LAST" = "$STABLE" ] ; then
 		echo "  stable job: $JOB"
-		let SCORE+=3
+		let SCORE+=3 || SCORE=0
 	elif [ "$LAST" = "$UNSTABLE" ] ; then
 		echo "unstable job: $JOB"
-		let SCORE+=1
+		let SCORE+=1 || SCORE=0
 		echo "   <li><a href=\"https://jenkins.debian.net/job/$JOB/\">$JOB</a></li>" >> ${UNSTABLE_JOBS}
 	else
 		case $JOB in
@@ -79,7 +79,7 @@ for JOB in reproducible_* ; do
 			echo "  failed job: $JOB - $MODIFIER"
 			echo "$MODIFIER|   <li><a href=\"https://jenkins.debian.net/job/$JOB/\">$JOB</a> <em>($MODIFIER)</em></li>" >> $FAILED_JOBS
 		fi
-		let SCORE-=$MODIFIER
+		let SCORE-=$MODIFIER || SCORE=0
 	fi
 	if $DEBUG ; then
 		echo SCORE=$SCORE



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/6f2da1246aad1b5dae7f4b6531c82f7fdb88d8b5

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/6f2da1246aad1b5dae7f4b6531c82f7fdb88d8b5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20200516/e33b06f2/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list