[med-svn] [Git][med-team/dicomscope][master] add autopkgtest for dicomscope

harish chavre (@Harish1) gitlab at salsa.debian.org
Thu Feb 12 03:49:56 GMT 2026



harish chavre pushed to branch master at Debian Med / dicomscope


Commits:
b36716c3 by Harish Chavre at 2026-02-12T09:00:55+05:30
add autopkgtest for dicomscope

- - - - -


2 changed files:

- + debian/tests/control
- + debian/tests/run-unit-test


Changes:

=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends:@, dicomscope, dcmtk, xvfb, xauth
+Restrictions: allow-stderr 


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,35 @@
+#!/bin/bash
+set -e
+
+bin="dicomscope"
+TESTFILE="/usr/share/dicomscope/reports/reportsi.dcm"
+
+if [ -z "$AUTOPKGTEST_TMP" ]; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${bin}-test.XXXXXX)
+  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+check_n_cleanup () {
+    local program_pids="$(
+        ps aux \
+        | awk "/^$USER"'.*dicomscope/ {print $2}' \
+        | xargs
+    )"
+
+    local xvfb_pids="$(
+        ps aux \
+        | awk -vORS=' ' "/^$USER"'.*[X]vfb/ {print $2}' \
+        | xargs
+    )"
+
+    [ -n "$program_pids" ] && kill $program_pids || true
+    [ -n "$xvfb_pids" ] && kill $xvfb_pids || true
+}
+
+cd "$AUTOPKGTEST_TMP"
+
+set -v
+xvfb-run --auto-servernum /usr/bin/dicomscope "$TESTFILE" 2>&1 &
+sleep  30
+check_n_cleanup
+



View it on GitLab: https://salsa.debian.org/med-team/dicomscope/-/commit/b36716c358ace8af2b63ae9e4bf91b23afa10949

-- 
View it on GitLab: https://salsa.debian.org/med-team/dicomscope/-/commit/b36716c358ace8af2b63ae9e4bf91b23afa10949
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260212/764aa168/attachment-0001.htm>


More information about the debian-med-commit mailing list