Your message dated Wed, 25 May 2022 01:48:46 +0000
with message-id <[email protected]>
and subject line Bug#1011352: fixed in libfreeaptx 0.1.1-2
has caused the Debian Bug report #1011352,
regarding Does not include an autopkgtest
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1011352: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011352
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libfreeaptx
Version: 0.1.1-1

It would be nicer if the package had autopkgtests testing. The attached patch is adding a trivial build test on the model of the ones used for most GNOME libraries, it ensure that a simple case builds and that the dev isn't missing any depends, and encode and decode tests copying the examples from the upstream github webpage. The tests are using a .wav from alsa-utils but it might make sense to include a wav in the package instead to avoid relying on external packages which might change in the futur.

We are using that change in Ubuntu now as having tests is a requirement to promote packages and we plan to preinstall libfreeaptx as part of the switch to pipewire.

Thanks for considering



diff -Nru libfreeaptx-0.1.1/debian/changelog libfreeaptx-0.1.1/debian/changelog
--- libfreeaptx-0.1.1/debian/changelog	2021-12-17 12:05:02.000000000 +0100
+++ libfreeaptx-0.1.1/debian/changelog	2022-05-20 15:23:06.000000000 +0200
@@ -1,3 +1,10 @@
+libfreeaptx (0.1.1-2) UNRELEASED; urgency=medium
+
+  * debian/tests: 
+    - include build, encore and decode autopkgtests
+
+ -- Sebastien Bacher <[email protected]>  Fri, 20 May 2022 15:23:06 +0200
+
 libfreeaptx (0.1.1-1) unstable; urgency=medium
 
   * Initial release (Closes: #995607)
diff -Nru libfreeaptx-0.1.1/debian/control libfreeaptx-0.1.1/debian/control
--- libfreeaptx-0.1.1/debian/control	2021-12-17 12:05:02.000000000 +0100
+++ libfreeaptx-0.1.1/debian/control	2022-05-20 15:23:06.000000000 +0200
@@ -1,6 +1,7 @@
 Source: libfreeaptx
 Priority: optional
-Maintainer: Kentaro Hayashi <[email protected]>
+Maintainer: Ubuntu Developers <[email protected]>
+XSBC-Original-Maintainer: Kentaro Hayashi <[email protected]>
 Build-Depends: debhelper-compat (= 13)
 Standards-Version: 4.6.0
 Section: libs
diff -Nru libfreeaptx-0.1.1/debian/tests/build libfreeaptx-0.1.1/debian/tests/build
--- libfreeaptx-0.1.1/debian/tests/build	1970-01-01 01:00:00.000000000 +0100
+++ libfreeaptx-0.1.1/debian/tests/build	2022-05-20 14:56:01.000000000 +0200
@@ -0,0 +1,31 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against libfreeaptx, to verify that
+# the headers and pkg-config file are installed correctly
+
+set -e
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+    CROSS_COMPILE=
+fi
+
+cat <<EOF > libfreeaptx_test.c
+#include "freeaptx.h"
+
+int main(void)
+{
+  struct aptx_context *dec;
+  dec = aptx_init(0);
+  return 0;
+}
+EOF
+
+# deliberately word-splitting pkg-config output:
+# shellcheck disable=SC2046
+"${CROSS_COMPILE}gcc" -o libfreeaptx_test libfreeaptx_test.c \
+$("${CROSS_COMPILE}pkg-config" --cflags --libs libfreeaptx)
+echo "build: OK"
+[ -x libfreeaptx_test ]
+./libfreeaptx_test
+echo "run: OK"
diff -Nru libfreeaptx-0.1.1/debian/tests/control libfreeaptx-0.1.1/debian/tests/control
--- libfreeaptx-0.1.1/debian/tests/control	1970-01-01 01:00:00.000000000 +0100
+++ libfreeaptx-0.1.1/debian/tests/control	2022-05-20 15:22:48.000000000 +0200
@@ -0,0 +1,11 @@
+Tests: build
+Depends: build-essential, pkg-config, libfreeaptx-dev
+Restrictions: allow-stderr superficial
+
+Test-Command: sox /usr/share/sounds/alsa/Noise.wav -t raw -r 44.1k -L -e s -b 24 -c 2 - | freeaptxenc > $AUTOPKGTEST_TMP/sample.aptx; freeaptxdec < $AUTOPKGTEST_TMP/sample.aptx | sox -t raw -r 44.1k -L -e s -b 24 -c 2 - $AUTOPKGTEST_TMP/sample.wav
+Depends: alsa-utils, freeaptx-utils, sox
+Features: test-name=encore_decode
+
+Test-Command: sox /usr/share/sounds/alsa/Noise.wav -t raw -r 44.1k -L -e s -b 24 -c 2 - | freeaptxenc --hd > $AUTOPKGTEST_TMP/sample.aptx; freeaptxdec --hd < $AUTOPKGTEST_TMP/sample.aptx | sox -t raw -r 44.1k -L -e s -b 24 -c 2 - $AUTOPKGTEST_TMP/sample.wav
+Depends: alsa-utils, freeaptx-utils, sox
+Features: test-name=encore_decode_hd

--- End Message ---
--- Begin Message ---
Source: libfreeaptx
Source-Version: 0.1.1-2
Done: Kentaro Hayashi <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libfreeaptx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kentaro Hayashi <[email protected]> (supplier of updated libfreeaptx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 25 May 2022 10:15:48 +0900
Source: libfreeaptx
Architecture: source
Version: 0.1.1-2
Distribution: unstable
Urgency: medium
Maintainer: Kentaro Hayashi <[email protected]>
Changed-By: Kentaro Hayashi <[email protected]>
Closes: 1011352
Changes:
 libfreeaptx (0.1.1-2) unstable; urgency=medium
 .
   [ Sebastien Bacher ]
   * debian/tests:
     - include build, encore and decode autopkgtests (Closes: #1011352)
Checksums-Sha1:
 17405ac259f83b59e46aad5bf97fbd5c4080ce91 2076 libfreeaptx_0.1.1-2.dsc
 8a200cb432cfccf9ec9339e724f4c8c8a8225d9c 4672 libfreeaptx_0.1.1-2.debian.tar.xz
 02706ab78743d4020c30b941ada1ee4e3649b3f0 6933 
libfreeaptx_0.1.1-2_amd64.buildinfo
Checksums-Sha256:
 b930d3a5be3274da202b4fbda32bde17ad2e2eabf44c220c56da9264a6bb332d 2076 
libfreeaptx_0.1.1-2.dsc
 f6b41eb90be9d2a3366ba18298938e035ac0160abaf0238f9445c96652493e24 4672 
libfreeaptx_0.1.1-2.debian.tar.xz
 02504fa8c203d98fe19750790c1347fcf645aa9b1bd1096d7f4bf159e710171b 6933 
libfreeaptx_0.1.1-2_amd64.buildinfo
Files:
 b3f3c81ee22489eb969b0c9e96f86798 2076 libs optional libfreeaptx_0.1.1-2.dsc
 7c90f2cbf85ad3886905fe9e6cf4300b 4672 libs optional 
libfreeaptx_0.1.1-2.debian.tar.xz
 fe31af826b41cff09e42d8ba7314ae05 6933 libs optional 
libfreeaptx_0.1.1-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEcZ6y2T2+nE0h+6Bk9/t1xWbtIOMFAmKNhSIACgkQ9/t1xWbt
IONh1g/9EUcqrkJH26mWCNovuYHHEv+FcNjHKaJ/DPeieXXizPHezurdtevTCkHP
cgB0wMLyGqsQwwGIvqe/mauppGv2QxHwnfZ9mMM71El8329DQR+VWO/Jccs2ZZin
p5X2poSLyPKm4BhFER1XOWXhi6HZQ60gbQ6BgGi8OaRNR0oLk8W943gSyh3nRbOX
T5ZxU6Qs3nsWHsgegqOYDGk1h5UGl8puqIlYS3Jn++MCoCfiUwc1HSrGvoau6Kdk
hrl4ucFt99q6jYqune/W6Sszd1poMqJQbAvpLtIONzjEDWPpM0w+12dxb6QCliS+
E18LWUgpMbKVj2afXaQYGfumHDh0enm3cdsFUO9JZeWEJObkpqQCNbw+q0ersVgF
K6x8WfyWn9iGO14WdFPSXeK6ayENvn/kB2EodFXqpNTf+jt/HDdQfwGYSQsvrFjH
6mncivSfOh0h3wH5E85HkkONzANUStdgl3SAHnQZdYUpU5TWbv+fr/kBUHXWjHxe
vH8SvdiLAv8t1/7/exCX1rWPQa4McYdvV8ywmBeKUyoSrqbLuAOGL9lJqaj+7Gvd
YEAsBFFkLPuwQEr74mvPhrbGOIYAimNff8J1M+Zjo8OQlHkxHe1Dx1ypAk+z+SJb
1jSdhEu8uf/sjf6WPH8R6J9TG5hCzGFtkpWb4VR9d5GVevm3FTA=
=bL9a
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to