Unverified Commit 988c1e94 authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

reproducible debian: build: support old stretch's diffoscope that doesn't take --timeout

parent 79f9cf00
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ diffoscope_timed_out() {
}

call_diffoscope_on_changes_files() {
	local TMPLOG TIMEOUT TEMP MSG_PART1 session diffoscope_version
	local TMPLOG TIMEOUT DIFFOSCOPE_TIMEOUT TEMP MSG_PART1 session diffoscope_version
	# DIFFOSCOPE is globally used
	# filter lines describing .buildinfo files from .changes file
	sed -i -e '/^ [a-f0-9]\{32,64\} .*\.buildinfo$/d' b{1,2}/$CHANGES
@@ -368,15 +368,18 @@ call_diffoscope_on_changes_files() {

	# we have a working diffoscope!
	log_info "$DIFFOSCOPE will be used to compare the two builds:"
	if [ $(echo $DIFFOSCOPE_VERSION | awk '{print $2}') -ge 202 ]; then
		# this --timeout 120m below is arbitrary and can be subject to further evaluation later
		DIFFOSCOPE_TIMEOUT="--timeout $(( 120 * 60 ))"
	fi
	set -x
	set +e
	# the --timeout 120m below is arbitrary and can be subject to further evaluation later
	( timeout 155m nice schroot \
		--directory $TMPDIR \
		--run-session \
		-c "$session" \
		-- sh -c "export TMPDIR=$TEMP ; timeout $TIMEOUT diffoscope \
			--timeout $(( 120 * 60 )) \
			${DIFFOSCOPE_TIMEOUT-} \
			--html $TMPDIR/${DBDREPORT} \
			--text $TMPDIR/$DBDTXT \
			--json $TMPDIR/$DBDJSON \