]> git.puffer.fish Git - matthieu/frr.git/commitdiff
debian: Make the autopkgtest more resilient (Closes: #980111)
authorOndřej Surý <ondrej@sury.org>
Sun, 7 Feb 2021 11:52:35 +0000 (12:52 +0100)
committermergify-bot <noreply@mergify.io>
Wed, 7 Jul 2021 20:10:25 +0000 (20:10 +0000)
The Debian autopkgtest would fail with new PAM introduced in Debian bullseye.
Add a little loop to wait a little longer for the changes to propagate.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
(cherry picked from commit 33ce95cad08d40aca84e254a26547aac5054e232)

debian/tests/py-frr-reload

index e2c97e8744e978f6ee4cfbfc7ba96567220070c5..6dfef33f08d980fc6a5bc29f4dacbebf6f428fc4 100755 (executable)
@@ -22,7 +22,15 @@ sed -e '/^ip route 198.51.100.0\/28 127.0.0.1/ c ip route 198.51.100.64/28 127.0
 
 service frr reload
 
-vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.64/28 127.0.0.1'
+# wait for the new config to load
+for __t in $(seq 1 10); do
+       if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.64/28 127.0.0.1'; then
+               break
+       fi
+       sleep "$__t"
+done
+
+# fail if the old config is still loaded
 if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.0/28 127.0.0.1'; then
        exit 1
 fi