Update on patch.

On Thu, Oct 5, 2023 at 6:25 PM Nilesh Patra <nil...@riseup.net> wrote:
>
> On Thu, 5 Oct 2023 10:53:06 +0100 Luma <ach.lu...@gmail.com> wrote:
> > Hello,
> > Pleas find attached a patch for Bug#1009159.
>
> Thanks for the patch, but this looks wrong since it does not do anything other
> than printing out a help menu.
> We would like to actually test the binary for some data and verify whether 
> output
> is correct.
>
> Also, it seems to even return a non-zero exit code and fails its testsuite
> in current scenario. Did you run the autopkgtests before submitting it?
>
> autopkgtest [22:37:50]: test run-unit-test: [-----------------------
> # Too few arguments handed
> # Printing help message:
> # KmerResistance-2.0 correlates genes to species from WGS data, by mapping 
> reads with KMA
> # Options are:          Desc:                           Default:              
>   Requirements:
> #
> #       -i              Input/query file name                                 
>   REQUIRED
> #       -o              Output file                                           
>   REQUIRED
> #       -t_db           Template DB                                           
>   REQUIRED
> #       -s_db           Species DB                                            
>   REQUIRED
> #       -id             ID threshhold                   70.0
> #       -hid            Hard ID threshhold                      1.0
> #       -dct            Depth correction threshhold     0.1
> #       -kma            alternative KMA         kma
> #       -v              Version
> #       -h              Shows this help message
> #
> autopkgtest [22:37:51]: test run-unit-test: -----------------------]
> autopkgtest [22:37:51]: test run-unit-test:  - - - - - - - - - - results - - 
> - - - - - - - -
> run-unit-test        FAIL non-zero exit status 1
> autopkgtest [22:37:51]: @@@@@@@@@@@@@@@@@@@@ summary
> run-unit-test        FAIL non-zero exit status 1
diff -Naur kmerresistance-2.2.0/debian/tests/control work/kmerresistance-2.2.0/debian/tests/control
--- kmerresistance-2.2.0/debian/tests/control	1970-01-01 01:00:00.000000000 +0100
+++ work/kmerresistance-2.2.0/debian/tests/control	2023-10-09 13:18:55.488036588 +0100
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, build-essential
+Restrictions: allow-stderr
diff -Naur kmerresistance-2.2.0/debian/tests/run-unit-test work/kmerresistance-2.2.0/debian/tests/run-unit-test
--- kmerresistance-2.2.0/debian/tests/run-unit-test	1970-01-01 01:00:00.000000000 +0100
+++ work/kmerresistance-2.2.0/debian/tests/run-unit-test	2023-10-09 13:18:17.034486203 +0100
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e
+
+pkg=kmerresistance 
+
+export LC_ALL=C.UTF-8
+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}/* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+gunzip -r *
+
+echo "Testing C binary"
+kmerresistance -i reads_se.fq.gz -o output/name -t_db templates -s_db species
+kmerresistance -ipe reads_1.fq.gz reads_2.fq.gz -o output/name -t_db templates -s_db species
+echo "PASS"
+
+echo "Test Templates"
+kma index -i ResFinder.fsa -o ResFinder
+kma index -i bacteria.fsa -o bacteria -Sparse ATG
+kmerresistance -i sample_1.fastq sample_2.fastq -o out -t_db ResFinder -s_db bacteria
+echo "PASS"
+
+
+

Reply via email to