Andreas Tille pushed to branch master at Debian Med / libmio
Commits: 8e9d06a0 by Andreas Tille at 2026-10-27T17:06:52+01:00 Testing at build time and autopkgtest - - - - - b8037300 by Andreas Tille at 2026-10-27T17:08:11+01:00 Upload to unstable - - - - - 8 changed files: - + debian/README.test - debian/changelog - debian/control - + debian/libmio-dev.docs - + debian/libmio-dev.examples - debian/rules - + debian/tests/control - + debian/tests/run-unit-test Changes: ===================================== debian/README.test ===================================== @@ -0,0 +1,18 @@ +Notes on how this package can be tested. +──────────────────────────────────────── + +This package can be tested by running the provided test: + + sh run-unit-test + +in order to confirm its integrity. + +The upstream files in test/ are installed as examples, so that they can be +used as a starting point: + + test/test.cpp unit test covering the library, run by ctest during + the package build + test/example.cpp usage example, built and run by the package build + and by the autopkgtest as well + +Both are compiled and run at package build time and in the autopkgtest. ===================================== debian/changelog ===================================== @@ -1,5 +1,5 @@ -libmio (1.1.0~git20230303.8b6b7d8-1) UNRELEASED; urgency=medium +libmio (1.1.0~git20230303.8b6b7d8-1) unstable; urgency=medium - * Initial release (Closes: #XXXXXX) + * Initial release (Closes: #1152283) - -- Andreas Tille <[email protected]> Tue, 27 Oct 2026 12:00:00 +0100 + -- Andreas Tille <[email protected]> Tue, 27 Oct 2026 17:07:08 +0100 ===================================== debian/control ===================================== @@ -5,6 +5,7 @@ Uploaders: Andreas Tille <[email protected]>, Build-Depends: debhelper-compat (= 14), + dh-sequence-single-binary, cmake, Standards-Version: 4.7.4 Vcs-Browser: https://salsa.debian.org/med-team/libmio ===================================== debian/libmio-dev.docs ===================================== @@ -0,0 +1,2 @@ +debian/README.test +debian/tests/run-unit-test ===================================== debian/libmio-dev.examples ===================================== @@ -0,0 +1 @@ +test/*.cpp ===================================== debian/rules ===================================== @@ -2,3 +2,13 @@ %: dh $@ --buildsystem=cmake + +# The CMake test suite only builds test/test.cpp, so build and run the example +# next to it here. +override_dh_auto_test: + dh_auto_test + mkdir -p test-example + cd test-example && \ + $(CXX) -O2 -std=c++11 -I../include -o example ../test/example.cpp && \ + ./example > /dev/null + rm -rf test-example ===================================== debian/tests/control ===================================== @@ -0,0 +1,3 @@ +Tests: run-unit-test +Depends: @, build-essential +Restrictions: allow-stderr ===================================== debian/tests/run-unit-test ===================================== @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +pkg=libmio-dev + +export LC_ALL=C.UTF-8 +if [ "${AUTOPKGTEST_TMP}" = "" ] ; then + AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) + trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM + # shellcheck disable=SC2064 +fi + +cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}" + +cd "${AUTOPKGTEST_TMP}" + +# Build and run the upstream test and example against the installed header. +# Each one gets its own directory because both of them write files. +for src in test.cpp example.cpp ; do + name=$(basename "${src}" .cpp) + mkdir -p "${name}" + ( cd "${name}" && g++ -O2 -std=c++11 -o "${name}" "../${src}" && "./${name}" ) +done + +# See the autopkgtest documentation at +# https://salsa.debian.org/salsa-ci-team/pipeline/-/blob/master/README.md View it on GitLab: https://salsa.debian.org/med-team/libmio/-/compare/bf712c94ab53a932d20c2ef5b04b98931320db53...b8037300710ea9f19f19f6e141bdf275be85e0c7 -- View it on GitLab: https://salsa.debian.org/med-team/libmio/-/compare/bf712c94ab53a932d20c2ef5b04b98931320db53...b8037300710ea9f19f19f6e141bdf275be85e0c7 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
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
