[med-svn] [Git][med-team/libvgio][master] 2 commits: Run upstream test.cpp in override_dh_auto_test and use it as autopkgtest as well.

Andreas Tille (@tille) gitlab at salsa.debian.org
Mon Nov 2 16:44:36 GMT 2026



Andreas Tille pushed to branch master at Debian Med / libvgio


Commits:
ac9b5aec by Andreas Tille at 2026-10-30T12:08:36+01:00
Run upstream test.cpp in override_dh_auto_test and use it as autopkgtest as well.

- - - - -
74f799cb by Andreas Tille at 2026-10-30T12:10:57+01:00
Upload to unstable

- - - - -


8 changed files:

- debian/changelog
- debian/control
- + debian/libvgio-dev.examples
- debian/patches/install-paths-and-soname.patch
- debian/rules
- debian/tests/control
- + debian/tests/run-unit-test
- − debian/tests/smoke


Changes:

=====================================
debian/changelog
=====================================
@@ -1,5 +1,5 @@
-libvgio (0.0~git20261016.54490c2-1) UNRELEASED; urgency=medium
+libvgio (0.0~git20261016.54490c2-1) unstable; urgency=medium
 
   * Initial release (Closes: #1152536).
 
- -- Andreas Tille <tille at debian.org>  Fri, 30 Oct 2026 11:02:57 +0100
+ -- Andreas Tille <tille at debian.org>  Fri, 30 Oct 2026 12:09:18 +0100


=====================================
debian/control
=====================================
@@ -10,6 +10,7 @@ Build-Depends:
  d-shlibs,
  libhandlegraph-dev,
  libhts-dev,
+ libhtscodecs-dev,
  libjansson-dev,
  libprotobuf-dev,
  pkgconf,
@@ -40,6 +41,7 @@ Section: libdevel
 Depends:
  libhandlegraph-dev,
  libhts-dev,
+ libhtscodecs-dev,
  libjansson-dev,
  libprotobuf-dev,
  libvgio0 (= ${binary:Version}),


=====================================
debian/libvgio-dev.examples
=====================================
@@ -0,0 +1 @@
+test.cpp


=====================================
debian/patches/install-paths-and-soname.patch
=====================================
@@ -5,6 +5,8 @@ Description: Add a SONAME, honour build flags and find libhandlegraph from CMake
  references.
 Author: Andreas Tille <tille at debian.org>
 Last-Update: 2026-10-29
+Assisted-By: aim2balance.ai/a2b-code
+
 diff --git a/CMakeLists.txt b/CMakeLists.txt
 index 1621834..0414372 100644
 --- a/CMakeLists.txt


=====================================
debian/rules
=====================================
@@ -10,6 +10,10 @@ override_dh_auto_configure:
 		-DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
 		-DUSE_INSTALLED_LIBHANDLEGRAPH_ONLY=ON
 
+override_dh_auto_test:
+	dh_auto_build -- test_libvgio
+	./obj-$(DEB_HOST_GNU_TYPE)/test_libvgio
+
 execute_after_dh_install:
 	d-shlibmove --commit \
 		    --multiarch \


=====================================
debian/tests/control
=====================================
@@ -1,2 +1,3 @@
-Tests: smoke
-Depends: @, build-essential, cmake
+Tests: run-unit-test
+Depends: @, build-essential
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -e
+
+pkg=libvgio-dev
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  # shellcheck disable=SC2064
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
+cd "${AUTOPKGTEST_TMP}"
+g++ -O2 -Wall -o test_libvgio test.cpp -lvgio -lprotobuf
+./test_libvgio


=====================================
debian/tests/smoke deleted
=====================================
@@ -1,53 +0,0 @@
-#!/bin/sh
-set -e
-
-tmpdir=$(mktemp -d)
-trap 'rm -rf "$tmpdir"' EXIT
-
-cat > "$tmpdir/CMakeLists.txt" <<'EOF'
-cmake_minimum_required(VERSION 3.10)
-project(smoke CXX)
-
-find_package(VGio REQUIRED)
-
-add_executable(smoke smoke.cpp)
-target_link_libraries(smoke PRIVATE VGio::VGio)
-EOF
-
-cat > "$tmpdir/smoke.cpp" <<'EOF'
-#include <cstdio>
-#include <fstream>
-#include <stdexcept>
-#include <string>
-
-#include "vg/vg.pb.h"
-#include "vg/io/stream.hpp"
-
-int main() {
-    const std::string path = "smoke.vg";
-
-    vg::Graph graph;
-    vg::Node* node = graph.add_node();
-    node->set_id(1);
-    node->set_sequence("ACGT");
-    vg::io::write_to_file(graph, path);
-
-    size_t count = 0;
-    std::ifstream in(path, std::ios::binary);
-    vg::io::for_each<vg::Graph>(in, [&count](vg::Graph& part) {
-        ++count;
-        if (part.node_size() != 1 || part.node(0).sequence() != "ACGT") {
-            throw std::runtime_error("round-trip mismatch");
-        }
-    });
-    in.close();
-    std::remove(path.c_str());
-
-    return count == 1 ? 0 : 1;
-}
-EOF
-
-cmake -S "$tmpdir" -B "$tmpdir/build"
-cmake --build "$tmpdir/build"
-cd "$tmpdir"
-"$tmpdir/build/smoke"



View it on GitLab: https://salsa.debian.org/med-team/libvgio/-/compare/1b1fa6670964592fd39b1abd77b2d45ee17e9292...74f799cb6df91b4ebd4dba949b757b3e2610161e

-- 
View it on GitLab: https://salsa.debian.org/med-team/libvgio/-/compare/1b1fa6670964592fd39b1abd77b2d45ee17e9292...74f799cb6df91b4ebd4dba949b757b3e2610161e
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/20261102/ced46725/attachment-0001.htm>


More information about the debian-med-commit mailing list