[med-svn] [Git][med-team/falco][master] 3 commits: Add test 1:1 copied from fastqc to see whether it is really a plugin replacement
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Jun 9 16:23:46 BST 2026
Andreas Tille pushed to branch master at Debian Med / falco
Commits:
f229acef by Andreas Tille at 2026-06-09T16:59:12+02:00
Add test 1:1 copied from fastqc to see whether it is really a plugin replacement
- - - - -
0de77f17 by Andreas Tille at 2026-06-09T17:05:31+02:00
Fix path to configuration files
- - - - -
48336a17 by Andreas Tille at 2026-06-09T17:23:27+02:00
Fix patch
- - - - -
9 changed files:
- + debian/README.test
- + debian/falco.examples
- + debian/falco.install
- + debian/patches/Configuration.patch
- + debian/patches/series
- debian/rules
- + debian/source/include-binaries
- + debian/tests/control
- + debian/tests/run-unit-test
Changes:
=====================================
debian/README.test
=====================================
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+ cd examples && bash run-unit-test
+
+in order to confirm its integrity.
=====================================
debian/falco.examples
=====================================
@@ -0,0 +1,3 @@
+debian/tests.fastqc/*
+debian/tests/run-unit-test
+debian/tests/*.txt
=====================================
debian/falco.install
=====================================
@@ -0,0 +1 @@
+Configuration/* usr/share/falco
=====================================
debian/patches/Configuration.patch
=====================================
@@ -0,0 +1,26 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: 2026-06-09
+Description: Fix PATH to configuration files on Debian installs
+Forwarded: Not needed
+
+--- a/src/FalcoConfig.cpp
++++ b/src/FalcoConfig.cpp
+@@ -285,10 +285,14 @@ FalcoConfig::FalcoConfig(const int argc,
+ read_step = 1;
+ format = "";
+ threads = 1;
+- contaminants_file =
+- std::string(PROGRAM_PATH) + "/Configuration/contaminant_list.txt";
+- adapters_file = std::string(PROGRAM_PATH) + "/Configuration/adapter_list.txt";
+- limits_file = std::string(PROGRAM_PATH) + "/Configuration/limits.txt";
++
++ static const std::string config_dir =
++ std::ifstream("/usr/share/falco/limits.txt").good()
++ ? "/usr/share/falco"
++ : std::string(PROGRAM_PATH) + "/Configuration";
++ contaminants_file = config_dir + "/contaminant_list.txt";
++ adapters_file = config_dir + "/adapter_list.txt";
++ limits_file = config_dir + "/limits.txt";
+
+ clean_zero_bytes(contaminants_file);
+ clean_zero_bytes(adapters_file);
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+Configuration.patch
=====================================
debian/rules
=====================================
@@ -1,35 +1,8 @@
#!/usr/bin/make -f
# DH_VERBOSE := 1
-export LC_ALL=C.UTF-8
-include /usr/share/dpkg/default.mk
-# this provides:
-# DEB_SOURCE: the source package name
-# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
-# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
-# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
-# DEB_VERSION_UPSTREAM: the package's upstream version
-# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
-# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as
-# specified by <https://reproducible-builds.org/specs/source-date-epoch/>
-
-# for hardening you might like to uncomment this:
-# export DEB_BUILD_MAINT_OPTIONS=hardening=+all
-
-# Many problems with gcc-15 can be hidden by simply setting
-# Consult upstream repository for fixes first!
-#export DEB_CFLAGS_MAINT_APPEND += -std=gnu17
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
-
-### When overriding auto_test make sure DEB_BUILD_OPTIONS will be respected
-#override_dh_auto_test:
-#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-# do_stuff_for_testing
-#endif
-
-### If you **really** can not use uscan (even not with mode=git) use a debian/get-orig-script
-#get-orig-source:
-# . debian/get-orig-source
=====================================
debian/source/include-binaries
=====================================
@@ -0,0 +1 @@
+debian/tests.fastqc/toy_bam.bam
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, unzip
+Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -e
+
+pkg="falco"
+test_failures=0
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+ AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+ trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
+
+cd $AUTOPKGTEST_TMP
+
+find . -name "*.gz" -exec gunzip \{\} \;
+
+for sample in example.fastq toy_sam.sam toy_bam.bam ; do
+ /usr/bin/falco --extract "$sample"
+ result="${sample%%.*}_falco"
+ expected="${result}_expected_summary.txt"
+ if ! diff -q "${result}/summary.txt" ${expected} 2>/dev/null ; then
+ (( test_failures += 1 ))
+ cat <<EOT
+Summary results did not match contents of ${expected} for
+ falco "$sample"
+Please investigate!
+EOT
+ else
+ echo "Summary results match for: falco "$sample" "
+ fi
+ rm -rf "$result"*
+ echo ""
+done
+
+if (( test_failures == 0 )); then
+ echo "PASS"
+ exit 0
+fi
+
+echo "FAIL mismatched falco summary count: $test_failures"
+exit 1
View it on GitLab: https://salsa.debian.org/med-team/falco/-/compare/e4bfaa351119f1151912bdb04a4c60c85c23594a...48336a17e72d33ae112fefaa365371ce718f9ff4
--
View it on GitLab: https://salsa.debian.org/med-team/falco/-/compare/e4bfaa351119f1151912bdb04a4c60c85c23594a...48336a17e72d33ae112fefaa365371ce718f9ff4
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/20260609/199780ff/attachment-0001.htm>
More information about the debian-med-commit
mailing list