Sebastien Jodogne pushed to branch master at Debian Med / orthanc-wsi
Commits: 52bc8243 by jodogne-guest at 2026-04-19T11:15:19+02:00 fix run-dicom-image-transcode-test - - - - - 0047fda5 by jodogne-guest at 2026-04-19T11:22:56+02:00 Upload to unstable - - - - - 2 changed files: - debian/changelog - debian/tests/run-dicom-image-transcode-test Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,10 @@ +orthanc-wsi (3.3+dfsg-4) unstable; urgency=medium + + * Fix run-dicom-image-transcode-test, which was not properly waiting + for Orthanc to stop + + -- Sebastien Jodogne <[email protected]> Sun, 19 Apr 2026 11:13:31 +0200 + orthanc-wsi (3.3+dfsg-3) unstable; urgency=medium * Fix compatibility with Orthanc framework 1.12.11 ===================================== debian/tests/run-dicom-image-transcode-test ===================================== @@ -5,7 +5,6 @@ set -x pkg=orthanc-wsi CUR_DIR=`pwd` service_name=orthanc -orthanc_server="http://localhost:8042" if [ "${AUTOPKGTEST_TMP}" = "" ] ; then AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) @@ -29,18 +28,19 @@ fi # Stop running instance of orthanc sudo systemctl stop orthanc -sudo pkill Orthanc || true +sudo pkill -x Orthanc || true + +# Start Orthanc, but not as a service to use the custom configuration (*) sudo /usr/sbin/Orthanc ./configuration.json --verbose & # Try for 15 seconds to find the REST API of Orthanc in a healthy state -URL=http://localhost:8042/system tries=15 set +e # Thanks Etienne Mollier - https://lists.debian.org/debian-mentors/2025/04/msg00176.html while true do - STATUSCODE=$(curl --silent --output /dev/null --write-out "%{http_code}" ${URL}) + STATUSCODE=$(curl --silent --output /dev/null --write-out "%{http_code}" http://localhost:8042/system) test "$STATUSCODE" -eq 200 && echo "Orthanc initialized!" && break tries=$(expr "$tries" - 1) test "$tries" -le 0 && echo "Unable to initialize Orthanc" && exit 1 @@ -50,14 +50,23 @@ set -e # Transcode data and push to server -OrthancWSIDicomizer CMU-1-Small-Region.tiff --orthanc=$orthanc_server - +OrthancWSIDicomizer CMU-1-Small-Region.tiff --orthanc=http://localhost:8042 if [ $? -eq 0 ]; then echo "TIFF transcoded and pushed to Orthanc server" fi -# Stop orthanc -sudo systemctl stop orthanc -sudo pkill Orthanc || true +# Stop Orthanc, which was not started as a service (*) +curl http://localhost:8042/tools/shutdown -X POST + +count=0 +while pgrep -x Orthanc > /dev/null; do + if [ "$count" -ge 30 ]; then + echo "Error: Orthanc did not stop after 30 seconds" >&2 + exit 1 + fi + + sleep 1 + count=$((count + 1)) +done View it on GitLab: https://salsa.debian.org/med-team/orthanc-wsi/-/compare/553ad039928a8f95d5439222dc835266f2448adf...0047fda506b7158092d52542bc7a3c56f3237590 -- View it on GitLab: https://salsa.debian.org/med-team/orthanc-wsi/-/compare/553ad039928a8f95d5439222dc835266f2448adf...0047fda506b7158092d52542bc7a3c56f3237590 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
