Bug#969438: double-conversion: Please make new autopkgtests cross-test-friendly

Steve Langasek steve.langasek at canonical.com
Wed Sep 2 22:59:10 BST 2020


Package: double-conversion
Version: 3.1.5-5
Severity: minor
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu groovy ubuntu-patch

Hi Mo,

So in the same upload where you fixed bug #948559, you also introduced a new
autopkgtest, which was also not able to pass in a cross-test environment ;)

Attached, please find a patch to make the new cmake test work in a
cross-environment.

This has been uploaded to Ubuntu, to make the tests pass again and make
double-conversion migratable to the release.

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 at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru double-conversion-3.1.5/debian/tests/cmake double-conversion-3.1.5/debian/tests/cmake
--- double-conversion-3.1.5/debian/tests/cmake	1969-12-31 16:00:00.000000000 -0800
+++ double-conversion-3.1.5/debian/tests/cmake	2020-09-02 14:52:55.000000000 -0700
@@ -0,0 +1,21 @@
+#/bin/sh
+
+set -e
+
+cp debian/tests/CMakeLists.txt test/cctest/
+cd test/cctest
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    cat <<EOF > toolchain.cmake
+set(CMAKE_C_COMPILER $DEB_HOST_GNU_TYPE-gcc)
+set(CMAKE_CXX_COMPILER $DEB_HOST_GNU_TYPE-g++)
+set(PKG_CONFIG_EXECUTABLE $DEB_HOST_GNU_TYPE-pkg-config)
+set(CMAKE_MODULE_PATH /usr/lib/$DEB_HOST_GNU_TYPE/cmake;/usr/share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION};/usr/share/cmake)
+EOF
+    CCFILE=-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
+else
+    CCFILE=
+fi
+
+cmake "$CCFILE" -Bbuild
+cd build
+make all test
diff -Nru double-conversion-3.1.5/debian/tests/control double-conversion-3.1.5/debian/tests/control
--- double-conversion-3.1.5/debian/tests/control	2020-01-10 22:27:54.000000000 -0800
+++ double-conversion-3.1.5/debian/tests/control	2020-09-02 14:50:04.000000000 -0700
@@ -1,8 +1,6 @@
 Tests: unittest.sh
 Depends: @, build-essential
 
-Test-Command:
-  cp debian/tests/CMakeLists.txt test/cctest/;
-  cd test/cctest; cmake -Bbuild; cd build; make all test
+Tests: cmake
 Depends: @, build-essential, cmake
 Restrictions: allow-stderr


More information about the debian-science-maintainers mailing list