Package: ranger
Version: 1.9.3-3
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch ftbfs


Dear Maintainer,

ranger can ftbfs due to autopkgtest failure.

https://tests.reproducible-builds.org/debian/history/armhf/ranger.html
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-hirsute/hirsute/armhf/r/ranger/20210407_151703_4b750@/log.gz
https://autopkgtest.ubuntu.com/packages/r/ranger/

I believe this to be due to the "sleep 1" sometimes being insufficient
to allow for program startup and execution of the target command.

I propose the following:

diff -Nru ranger-1.9.3/debian/tests/t/command.t 
ranger-1.9.3/debian/tests/t/command.t
--- ranger-1.9.3/debian/tests/t/command.t   2020-01-02 19:50:07.000000000 -0700
+++ ranger-1.9.3/debian/tests/t/command.t   2021-04-08 15:25:53.000000000 -0600
@@ -5,7 +5,13 @@
 . `dirname $0`/boilerplate.sh

 screen -D -m -T linux -- ranger --cmd "touch $TESTNAME" &
-sleep 1
+
+i=0
+while [ ! -f $TESTNAME ] ; do
+   i=$((i + 1))
+   [ "$i" -ge "60" ] && break
+   sleep 1
+done

 pgrep -f $TESTNAME
 check_exit_code_true Session found

-Dan

Reply via email to