Le 08/06/2022 à 15:44, Arnaud Ferraris a écrit :
Attached patch 0001 fixes this issue so we can hope for this package to
transition normally.
Hmmm, this is embarassing, but I attached the wrong file (control file
missing "allow-stderr"). The correct patch is attached to this email.
Cheers,
Arnaud
From 981bc98305528eeb57330e7dda2eaf683b686170 Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferra...@collabora.com>
Date: Wed, 8 Jun 2022 15:08:21 +0200
Subject: d/tests: ensure autopkgtest won't fail when successful
`timeout` will return the command's exit code if it ends before reaching
the configured timeout. If the command runs normally then is killed by
`timeout`, the exit code will be 124. The test should therefore pass in
this case.
This commit adds a script wrapping the actual call and returning 0 if
the command's exit code is 124.
---
debian/tests/control | 4 ++--
debian/tests/startup-test | 11 +++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
create mode 100755 debian/tests/startup-test
diff --git a/debian/tests/control b/debian/tests/control
index c0a271c..5e74030 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,3 @@
-Test-Command: xvfb-run timeout -k2 5 /usr/bin/cawbird
-Restrictions: superficial
+Tests: startup-test
+Restrictions: allow-stderr, superficial
Depends: cawbird, xvfb, xauth
diff --git a/debian/tests/startup-test b/debian/tests/startup-test
new file mode 100755
index 0000000..294b7da
--- /dev/null
+++ b/debian/tests/startup-test
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+xvfb-run timeout -k2 5 /usr/bin/cawbird
+_RET="$?"
+
+# timeout will exit with code 124 if all goes well
+if [ "$_RET" = "124" ]; then
+ exit 0
+fi
+
+exit $_RET
--
2.35.1