[med-svn] [Git][med-team/relion][debian/master] Replace superficial autopkgtest with upstream unit test
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Nov 3 10:20:25 GMT 2026
Andreas Tille pushed to branch debian/master at Debian Med / relion
Commits:
6ab53537 by Andreas Tille at 2026-11-03T11:00:31+01:00
Replace superficial autopkgtest with upstream unit test
- - - - -
5 changed files:
- debian/changelog
- debian/patches/series
- + debian/patches/tests-catch2.patch
- debian/tests/control
- + debian/tests/run-unit-test
Changes:
=====================================
debian/changelog
=====================================
@@ -1,6 +1,8 @@
relion (5.1.1+ds-1) unstable; urgency=medium
* Team upload.
+
+ [ Yavor Doganov ]
* New upstream release.
* debian/watch (Repack-Suffix): Use +ds instead of +dfsg.
* debian/patches/system-eigen.patch: Remove now unnecessary hunk.
@@ -26,6 +28,9 @@ relion (5.1.1+ds-1) unstable; urgency=medium
* debian/copyright: Delete EPL license and its stanza; the files were
removed upstream. Update copyright years.
+ [ Andreas Tille ]
+ * Replace the superficial autopkgtest with the upstream Catch2
+
-- Yavor Doganov <yavor at gnu.org> Sun, 01 Nov 2026 19:24:28 +0200
relion (5.1.0+dfsg-1) unstable; urgency=medium
=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ format-security.patch
python3.patch
system-eigen.patch
private-libs.patch
+tests-catch2.patch
=====================================
debian/patches/tests-catch2.patch
=====================================
@@ -0,0 +1,17 @@
+Description: Disable POSIX signal handling in the Catch2 unit test
+ Catch2 2.x uses SIGSTKSZ as the size of a compile-time array. Since
+ glibc 2.34 SIGSTKSZ is no longer a constant expression, so the bundled
+ Catch2 header fails to compile. The unit test does not depend on
+ Catch2's fatal signal handler; disable it.
+Author: Andreas Tille <tille at debian.org>
+Forwarded: not-needed
+Last-Update: 2026-11-03
+Assisted-By: DeepSeek V4.1 Flash Free
+---
+--- a/tests/tests.cpp
++++ b/tests/tests.cpp
+@@ -1,3 +1,4 @@
++#define CATCH_CONFIG_NO_POSIX_SIGNALS
+ #define CATCH_CONFIG_MAIN
+
+ #include <catch2/catch.hpp>
=====================================
debian/tests/control
=====================================
@@ -1,5 +1,3 @@
-Test-Command: /usr/bin/relion_refine
-Depends:
- relion,
-Restrictions:
- superficial,
+Tests: run-unit-test
+Depends: @, @builddeps@
+Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,36 @@
+#!/bin/sh
+# autopkgtest for relion: build and run the upstream Catch2 unit test.
+
+set -e
+
+pkg=relion
+
+# autopkgtest starts the test in the unpacked upstream source tree. For
+# manual runs the source directory can also be passed as an argument.
+srcdir=${1:-$PWD}
+if [ ! -f "${srcdir}/tests/tests.cpp" ]; then
+ echo "Usage: $0 [path-to-relion-source-directory]" >&2
+ echo "Run this test from an unpacked relion source tree." >&2
+ exit 1
+fi
+
+if [ -z "${AUTOPKGTEST_TMP}" ]; then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap 'rm -rf "${AUTOPKGTEST_TMP}"' 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd "${srcdir}"
+
+# tests.cpp includes ctf.cpp, so compiling only the test source is enough;
+# the remaining symbols come from the installed relion library.
+mpicxx -std=c++17 -fopenmp \
+ -DHAVE_JPEG -DHAVE_PNG -DHAVE_SINCOS -DHAVE_TIFF \
+ -I. -Itests -I/usr/include/eigen3 \
+ tests/tests.cpp -o "${AUTOPKGTEST_TMP}/relion-tests" \
+ -L/usr/lib/relion -lrelion_lib \
+ -lfftw3f -lfftw3 -ltiff -lpng -ljpeg \
+ -Wl,-rpath,/usr/lib/relion
+
+"${AUTOPKGTEST_TMP}/relion-tests"
+
+echo "PASS"
View it on GitLab: https://salsa.debian.org/med-team/relion/-/commit/6ab535374ecdda0d1e04de054dfdec232c8f00a1
--
View it on GitLab: https://salsa.debian.org/med-team/relion/-/commit/6ab535374ecdda0d1e04de054dfdec232c8f00a1
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261103/ed56a07b/attachment-0001.htm>
More information about the debian-med-commit
mailing list