[Git][qa/jenkins.debian.net][master] 3 commits: djm: refactoring

Holger Levsen (@holger) gitlab at salsa.debian.org
Sat Sep 23 11:33:03 BST 2023



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


Commits:
b413b116 by Holger Levsen at 2023-09-23T10:42:00+02:00
djm: refactoring

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

- - - - -
51ef3b6f by Holger Levsen at 2023-09-23T11:30:15+02:00
diffoscope_distribution_test: do fail when diffoscope version cannot be determined

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

- - - - -
ac887a9b by Holger Levsen at 2023-09-23T12:32:46+02:00
reproducible Debian: run diffoscope with lower ionice priority

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

- - - - -


3 changed files:

- bin/diffoscope_distribution_test.sh
- bin/djm
- bin/reproducible_build.sh


Changes:

=====================================
bin/diffoscope_distribution_test.sh
=====================================
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright 2014-2022 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2023 Holger Levsen <holger at layer-acht.org>
 # released under the GPLv2
 
 DEBUG=false
@@ -111,8 +111,7 @@ done
 
 if [ "$DIFFOSCOPE_IN_DEBIAN" = "" ] ; then
 	echo "Warning: Cannot determine diffoscope version in Debian, aborting."
-	# don't fail the job if rmadison temporarily doesn't work
-	exit 0
+	exit 1
 fi
 
 MESSAGE=""


=====================================
bin/djm
=====================================
@@ -347,7 +347,7 @@ djm_report() {
 	fi
 	TMP_LOGFILE=$(mktemp)
 	cat $LOCAL_LOGFILE $UI_LOGFILE | grep ^$LOGMONTH | sort -u > $TMP_LOGFILE
-	TOTAL=$(grep -c ^$LOGMONTH $TMP_LOGFILE)
+	TOTAL_ACTIONS=$(grep -c ^$LOGMONTH $TMP_LOGFILE)
 	HOSTS=$(cut -d ',' -f2 $TMP_LOGFILE | sort -u | grep -v "web UI"| wc -l)
 	HOURS=$(cut -b 1-13 $TMP_LOGFILE | sort -u | wc -l)
 	TEN_MIN_SLICES=$(cut -b 1-15 $TMP_LOGFILE | sort -u | wc -l)
@@ -369,7 +369,7 @@ djm_report() {
 	seperator "="
 	printf "$TWO_C" "month:" "$LOGMONTH"
 	seperator
-	printf "$TWO_C" "djm actions:" "$TOTAL"
+	printf "$TWO_C" "djm actions:" "$TOTAL_ACTIONS"
 	printf "$TWO_C" "hosts maintained:" "$HOSTS"
 	printf "$TWO_C" "jenkins jobs maintained:" "$(cat $JOBS)"
 	seperator
@@ -385,8 +385,8 @@ djm_report() {
 	for action in $ACTIONS ; do
 		grep_action="$(echo $action | sed -s 's#=# #g' | xargs echo)"
 		AMOUNT=$(cut -d ',' -f3 $TMP_LOGFILE |grep "$grep_action"|wc -l)
-		PERCENT=$((200*$AMOUNT/$TOTAL % 2 + 100*$AMOUNT/$TOTAL))
-		printf "$THREE_C" "$grep_action:" "$PERCENT%" "($AMOUNT / $TOTAL)"
+		PERCENT=$((200*$AMOUNT/$TOTAL_ACTIONS % 2 + 100*$AMOUNT/$TOTAL_ACTIONS))
+		printf "$THREE_C" "$grep_action:" "$PERCENT%" "($AMOUNT / $TOTAL_ACTIONS)"
 	done
 	seperator "="
 
@@ -395,8 +395,8 @@ djm_report() {
 	for reason in $REASONS ; do
 		grep_reason="$(echo $reason | sed -s 's#=# #g' | xargs echo)"
 		AMOUNT=$(cut -d ',' -f4 $TMP_LOGFILE |grep "$grep_reason"|wc -l)
-		PERCENT=$((200*$AMOUNT/$TOTAL % 2 + 100*$AMOUNT/$TOTAL))
-		printf "$THREE_C" "$grep_reason:" "$PERCENT%" "($AMOUNT / $TOTAL)"
+		PERCENT=$((200*$AMOUNT/$TOTAL_ACTIONS % 2 + 100*$AMOUNT/$TOTAL_ACTIONS))
+		printf "$THREE_C" "$grep_reason:" "$PERCENT%" "($AMOUNT / $TOTAL_ACTIONS)"
 	done
 	seperator "="
 


=====================================
bin/reproducible_build.sh
=====================================
@@ -390,7 +390,7 @@ call_diffoscope_on_changes_files() {
 	##dbd 	--run-session \
 	##dbd 	-c "$session" \
 	##dbd 	-- sh -c "export TMPDIR=$TEMP ; timeout $TIMEOUT diffoscope \
-	( timeout 155m nice sh -c "export TMPDIR=$TEMP ; cd $TMPDIR ; timeout $TIMEOUT diffoscope \
+	( timeout 155m nice sh -c "export TMPDIR=$TEMP ; cd $TMPDIR ; timeout $TIMEOUT ionice -n 6 diffoscope \
 			${DIFFOSCOPE_TIMEOUT-} \
 			${DIFFOSCOPE_OUTPUT} \
 			--profile=- \



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/dce8e9b32e09a2ad593a0f8bd4bc20b813051f17...ac887a9bcc691db915376446c03b95148d2b6df0

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/dce8e9b32e09a2ad593a0f8bd4bc20b813051f17...ac887a9bcc691db915376446c03b95148d2b6df0
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/20230923/6402799c/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list