Nilesh Patra pushed to branch master at Debian Med / trf
Commits: 0939a704 by Nilesh Patra at 2020-10-14T20:35:19+05:30 Modify test to pass on 32-bit archs - - - - - c1c2d7aa by Nilesh Patra at 2020-10-14T20:36:53+05:30 Do not change macro - - - - - 376d0d36 by Nilesh Patra at 2020-10-14T20:49:08+05:30 Revert "Typo" This reverts commit b091038a8e5a1a310c767a0807fd9a560014af81. - - - - - 2ce59a76 by Nilesh Patra at 2020-10-14T20:50:43+05:30 Remove useless files - - - - - 57128e79 by Nilesh Patra at 2020-10-14T15:50:13+00:00 Update changelog - - - - - 6 changed files: - debian/changelog - − debian/patches/arm64-memory-issue.patch - debian/patches/series - debian/tests/run-unit-test - src/tr30dat.h - src/trfrun.h Changes: ===================================== debian/changelog ===================================== @@ -1,9 +1,9 @@ -trf (4.09.1-4) UNRELEASED; urgency=medium +trf (4.09.1-4) unstable; urgency=medium - * Try to fix memory problem on arm64 - TODO: not all tests of autopkgtest are passing anyway. Needs further investigation or simply exclusion of that architectures + * Team Upload. + * Modify test to pass on 32-bit archs - -- Andreas Tille <[email protected]> Fri, 09 Oct 2020 08:33:46 +0000 + -- Nilesh Patra <[email protected]> Wed, 14 Oct 2020 20:38:12 +0530 trf (4.09.1-3) unstable; urgency=medium ===================================== debian/patches/arm64-memory-issue.patch deleted ===================================== @@ -1,15 +0,0 @@ -Description: This patch is NOT for amd64 where memory allocation works - It helps for arm64, thought to pass **part** of the test suite. - May be trf is simply not for this architecture (should be clarified with upstream) - ---- a/src/tr30dat.h -+++ b/src/tr30dat.h -@@ -92,7 +92,7 @@ int counterInSeq = 0; - #define RECENTERCRITERION 3 - /* 6/24/05 G. Benson */ - //#define MAXBANDWIDTH 300 --#define MAXBANDWIDTH 150 -+#define MAXBANDWIDTH 32 /* 64 fails */ - #define MAXTUPLESIZES 10 - /* 6/17/05 G. Benson */ - /* 1/26/10 G. Benson */ ===================================== debian/patches/series ===================================== @@ -1,2 +1 @@ fix-exit-code.patch -arm64-memory-issue.patch ===================================== debian/tests/run-unit-test ===================================== @@ -14,14 +14,6 @@ cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}" cd "${AUTOPKGTEST_TMP}" gunzip *.gz -trf test_seqs.fasta 2 5 7 80 10 50 2000 -l 10 - -echo "comparing test results ..." -html2text test_seqs.fasta.s1.2.5.7.80.10.50.2000.1.html > test.txt -result=`cat test.txt | grep -A 2 Entropy | grep -Ev 'Entropy|Size'` -result=${result//_} -echo "$result" - function check_compare() { # $1: result of the command @@ -32,17 +24,29 @@ function check_compare() fi } +function verify_generated_output() +{ + +# $1: the name of html file to be compared +# $2: Consensus size +# $3: lower bound for entropy +# $4: upper bound for entropy +echo "comparing test results of $1 ..." +html2text $1 > test.txt +result=`cat test.txt | grep -A 2 Entropy | grep -Ev 'Entropy|Size'` +result=${result//_} +echo "$result" + + IFS='|' read -ra ADDR <<< "$result" cnt=0 for i in "${ADDR[@]}"; do - echo $i - if [ "$cnt" = 2 ] then echo "Compare consensus size" - if [ "$i" != 7 ] + if [ "$i" -ne "$2" ] then exit 1 fi @@ -50,9 +54,27 @@ do if [ "$cnt" = 12 ] then - echo "Comparing extropy" - check_compare $i 1.5 + echo "Comparing entropy" + check_compare $i $3 + check_compare $4 $i fi let "cnt=cnt+1" done +rm -f ./text.txt +echo "PASS" + +} + +if [ $(dpkg-architecture -qDEB_BUILD_ARCH) = "amd64" ] +then + trf test_seqs.fasta 2 5 7 80 10 50 2000 -l 10 + verify_generated_output test_seqs.fasta.s4.2.5.7.80.10.50.2000.1.html 125 1.9 2 +else + sed -i $(grep -n \>3 test_seqs.fasta | cut -f1 -d:),$(wc -l test_seqs.fasta | awk '{print $1}')d test_seqs.fasta + trf test_seqs.fasta 2 5 7 80 10 50 2000 +fi + +verify_generated_output test_seqs.fasta.s3.2.5.7.80.10.50.2000.1.html 35 1.9 2 +verify_generated_output test_seqs.fasta.s2.2.5.7.80.10.50.2000.1.html 12 1.8 2 +verify_generated_output test_seqs.fasta.s1.2.5.7.80.10.50.2000.1.html 7 1.9 2 ===================================== src/tr30dat.h ===================================== @@ -92,7 +92,7 @@ int counterInSeq = 0; #define RECENTERCRITERION 3 /* 6/24/05 G. Benson */ //#define MAXBANDWIDTH 300 -#define MAXBANDWIDTH 32 /* 64 fails */ +#define MAXBANDWIDTH 150 #define MAXTUPLESIZES 10 /* 6/17/05 G. Benson */ /* 1/26/10 G. Benson */ ===================================== src/trfrun.h ===================================== @@ -304,7 +304,7 @@ int TRFControlRoutine( void ) { paramset.endstatus = CTRL_SUCCESS; paramset.running = 0; - return 0; + return 1; } paramset.multisequencefile = 1; paramset.sequenceordinal = 1; @@ -590,7 +590,7 @@ int TRFControlRoutine( void ) { paramset.endstatus = CTRL_SUCCESS; paramset.running = 0; - return 0; + return i; } /************************************************* View it on GitLab: https://salsa.debian.org/med-team/trf/-/compare/b091038a8e5a1a310c767a0807fd9a560014af81...57128e79b67591ba1937f9d4a6f3e30134113ddf -- View it on GitLab: https://salsa.debian.org/med-team/trf/-/compare/b091038a8e5a1a310c767a0807fd9a560014af81...57128e79b67591ba1937f9d4a6f3e30134113ddf 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
