[med-svn] [Git][med-team/ivar][master] 2 commits: Fix test suite to build with make --shuffle=reverse Closes: #1105421

Andreas Tille (@tille) gitlab at salsa.debian.org
Sat Sep 5 06:31:23 BST 2026



Andreas Tille pushed to branch master at Debian Med / ivar


Commits:
efe5fdde by Andreas Tille at 2026-09-05T07:29:01+02:00
Fix test suite to build with make --shuffle=reverse Closes: #1105421

- - - - -
8df91a28 by Andreas Tille at 2026-09-05T07:29:53+02:00
No attempt to build for i386 in Salsa CI

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/enable_make-shuffle-reverse.patch
- debian/patches/series
- debian/salsa-ci.yml


Changes:

=====================================
debian/changelog
=====================================
@@ -3,6 +3,9 @@ ivar (1.4.4+dfsg-4) UNRELEASED; urgency=medium
   * Build-Depends: architecture-is-64-bit, architecture-is-little-endian
     This removes the need for fixing i386 autopkgtest issue, it was
     never build on s390x - so do not create workload on this autobuilder
+  * Fix test suite to build with make --shuffle=reverse
+    Closes: #1105421
+  * No attempt to build for i386 in Salsa CI
 
  -- Andreas Tille <tille at debian.org>  Sat, 05 Sep 2026 06:54:23 +0200
 


=====================================
debian/patches/enable_make-shuffle-reverse.patch
=====================================
@@ -0,0 +1,59 @@
+Description: check_removereads: do not depend on check_getmasked having run first
+ test_removereads.cpp reads ../data/test.masked_primer_indices.txt but never
+ generates it. That file is only ever written by check_getmasked (via
+ get_primers_with_mismatches(), tests/test_getmasked.cpp), so check_removereads
+ has always silently relied on check_getmasked having run earlier in the same
+ tests/Makefile.am TESTS list and left the file behind.
+ .
+ In the shipped TESTS order this happens to hold, so the test passes. Under
+ dpkg-buildpackage's shuffle=reverse reproducible-builds variation the TESTS
+ execution order is reversed, check_removereads then runs before
+ check_getmasked has (re)created the file, amp ends up empty/stale,
+ rmv_reads_from_amplicon() filters no reads ("0 reads were removed" instead of
+ the expected 8), and the test's own sanity check on the output BAM fails:
+ .
+   FAIL: check_removereads
+ .
+ Fix this at the root: have check_removereads regenerate the masked-primer
+ file itself (the same call check_getmasked makes), removing the hidden
+ inter-test dependency entirely, independent of execution order. This needs
+ get_masked_amplicons.cpp linked into check_removereads as well.
+Author: Andreas Tille <tille at debian.org>
+Bug-Debian: https://bugs.debian.org/#1105421
+Last-Update: 2026-09-05
+---
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -17,7 +17,7 @@ check_variants_SOURCES = test_variants.cpp ../src/call_variants.cpp ../src/all
+ check_common_variants_SOURCES = test_common_variants.cpp ../src/get_common_variants.cpp
+ check_primer_bed_SOURCES = test_primer_bed.cpp ../src/primer_bed.cpp
+ check_getmasked_SOURCES = test_getmasked.cpp ../src/get_masked_amplicons.cpp ../src/primer_bed.cpp
+-check_removereads_SOURCES = test_removereads.cpp ../src/remove_reads_from_amplicon.cpp ../src/primer_bed.cpp ../src/trim_primer_quality.cpp ../src/interval_tree.cpp
++check_removereads_SOURCES = test_removereads.cpp ../src/remove_reads_from_amplicon.cpp ../src/primer_bed.cpp ../src/trim_primer_quality.cpp ../src/interval_tree.cpp ../src/get_masked_amplicons.cpp
+ check_unpaired_trim_SOURCES = test_unpaired_trim.cpp ../src/trim_primer_quality.cpp ../src/primer_bed.cpp ../src/interval_tree.cpp
+ check_primer_trim_edge_cases_SOURCES = test_primer_trim_edge_cases.cpp ../src/trim_primer_quality.cpp ../src/primer_bed.cpp ../src/interval_tree.cpp
+ check_isize_trim_SOURCES = test_isize_trim.cpp ../src/trim_primer_quality.cpp ../src/primer_bed.cpp ../src/interval_tree.cpp
+--- a/tests/test_removereads.cpp
++++ b/tests/test_removereads.cpp
+@@ -2,12 +2,21 @@
+ #include <iostream>
+ #include <vector>
+ 
++#include "../src/get_masked_amplicons.h"
+ #include "../src/remove_reads_from_amplicon.h"
+ #include "htslib/sam.h"
+ 
+ int main() {
+   int num_success = 0, num_tests = 1;
+   std::vector<std::string> amp;
++  // Regenerate the masked primer indices file instead of relying on
++  // check_getmasked having already produced it as a side effect: the
++  // TESTS order is not guaranteed (e.g. it is reversed by reproducible
++  // builds' shuffle=reverse variation), so this test must not depend on
++  // another test having run first.
++  get_primers_with_mismatches("../data/test.bed", "../data/test.filtered.tsv",
++                              "../data/test.masked_primer_indices",
++                              "../data/pair_information.tsv");
+   std::ifstream fin("../data/test.masked_primer_indices.txt");
+   std::string s, region = "Consensus_ZI-27_threshold_0_quality_20";
+   while (getline(fin, s, '\t')) {


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ Fix-warning.patch
 forward-build-options.patch
 privacy-breach.patch
 gcc-13-2.patch
+enable_make-shuffle-reverse.patch


=====================================
debian/salsa-ci.yml
=====================================
@@ -1,3 +1,7 @@
 ---
 include:
   - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
+
+variables:
+  SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
+



View it on GitLab: https://salsa.debian.org/med-team/ivar/-/compare/22604dc26cf35569f27ddffec4f94d38d36f5b25...8df91a28fac1634c3d21cd23ef16fbbe67671f2a

-- 
View it on GitLab: https://salsa.debian.org/med-team/ivar/-/compare/22604dc26cf35569f27ddffec4f94d38d36f5b25...8df91a28fac1634c3d21cd23ef16fbbe67671f2a
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/20260905/9588617a/attachment-0001.htm>


More information about the debian-med-commit mailing list