[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#946478: libvorbis: Please make autopkgtests cross-test-friendly



Package: libvorbis
Version: 1.3.6-2
Severity: minor
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch

Dear maintainers,

In Ubuntu, we are in the process of moving the i386 architecture to a
compatibility-only layer on amd64, and therefore we are also moving our
autopkgtest infrastructure to test i386 binaries in a cross-environment.

This requires changes to some tests so that they are cross-aware and can do
the right thing.

One of the libvorbis tests currently fails in this environment, because it
is a build test that does not invoke the toolchain in a cross-aware manner. 
In addition, all of the tests have a test dependency on pysycache-i18n,
which is an architecture: all package that is not marked Multi-Arch: foreign
which means this dependency can't be satisfied as-is.  However, by tagging
this test dep with :native, the dependency can be satisfied for both
same-arch and cross-arch testing.

I've verified that the attached patch lets the tests successfully build (and
run) i386 tests on an amd64 host.

Note that upstream autopkgtest doesn't currently set DEB_HOST_ARCH so this
is a complete no-op in Debian for the moment.  Support for cross-testing in
autopkgtest is currently awaiting review at
https://salsa.debian.org/ci-team/autopkgtest/merge_requests/69 and once
landed, will still have no effect unless autopkgtest is invoked with a '-a'
option.  So this change should be safe to land in your package despite this
not being upstream in autopkgtest.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
diff -Nru libvorbis-1.3.6/debian/tests/control libvorbis-1.3.6/debian/tests/control
--- libvorbis-1.3.6/debian/tests/control	2019-02-24 11:33:46.000000000 -0800
+++ libvorbis-1.3.6/debian/tests/control	2019-12-09 11:45:30.000000000 -0800
@@ -1,2 +1,2 @@
-Depends: @, vorbis-tools, build-essential, pysycache-i18n, sound-icons, valgrind
+Depends: @, vorbis-tools, build-essential, pysycache-i18n:native, sound-icons, valgrind
 Tests: test-examples test-coupling-segfault
diff -Nru libvorbis-1.3.6/debian/tests/test-examples libvorbis-1.3.6/debian/tests/test-examples
--- libvorbis-1.3.6/debian/tests/test-examples	2019-02-25 13:02:32.000000000 -0800
+++ libvorbis-1.3.6/debian/tests/test-examples	2019-12-09 12:07:09.000000000 -0800
@@ -7,7 +7,11 @@
 
 set -e
 
-CC=gcc
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CC="$DEB_HOST_GNU_TYPE-gcc"
+else
+    CC=gcc
+fi
 
 retval=0
 cd $AUTOPKGTEST_TMP

Reply to: