[med-svn] [Git][med-team/ncbi-tools6][master] Autopkgtest: improved a couple of tests by checking its output content

Liubov Chuprikova gitlab at salsa.debian.org
Mon Apr 9 00:20:16 BST 2018


Liubov Chuprikova pushed to branch master at Debian Med / ncbi-tools6


Commits:
6576aed1 by Liubov Chuprikova at 2018-04-08T23:15:17+00:00
Autopkgtest: improved a couple of tests by checking its output content

- - - - -


1 changed file:

- debian/tests/run-unit-test


Changes:

=====================================
debian/tests/run-unit-test
=====================================
--- a/debian/tests/run-unit-test
+++ b/debian/tests/run-unit-test
@@ -14,44 +14,70 @@ cp /usr/share/ncbi/data/autofix.prt .
 cp /usr/share/ncbi/data/UniVec.* .
 gunzip *.gz
 
-echo '---asn2all test---'
-/usr/bin/asn2all -i nc0225.aso -b -f g -o nc0225.nuc -v nc0225.prt
-[ -s nc0225.nuc ]
-[ -s nc0225.prt ]
-
+##################################################################
 echo '---asn2asn test---'
+##################################################################
 /usr/bin/asn2asn -i nc0225.aso -b -o nc0225.text
+/usr/bin/asn2asn -i nc0225.text -s -o nc0225_new.aso
 [ -s nc0225.text ]
+[ -s nc0225_new.aso ]
+diff nc0225.aso nc0225_new.aso
+rm nc0225.aso nc0225_new.aso
 
+##################################################################
+echo '---asn2all test---'
+##################################################################
+/usr/bin/asn2all -i nc0225.text -f g -o nc0225.nuc -v nc0225.prt
+[ -s nc0225.nuc ]
+genes_dna="$(grep -c " mol dna ," nc0225.text)"
+genes_rna="$(grep -c " mol rna ," nc0225.text)"
+genes=$(expr $genes_dna + $genes_rna)
+nuc="$(grep -c "^LOCUS " nc0225.nuc)"
+[ $genes -eq $nuc ]
+[ -s nc0225.prt ]
+proteins="$(grep -c " mol aa ," nc0225.text)"
+prt="$(grep -c "^LOCUS " nc0225.prt)"
+[ $proteins -eq $prt ]
+
+##################################################################
 echo '---asn2fsa test---'
-/usr/bin/asn2fsa -i nc0225.aso -b -a t -o nc0225.fna -v nc0225.faa
+##################################################################
+/usr/bin/asn2fsa -i nc0225.text -a t -o nc0225.fna -v nc0225.faa
 [ -s nc0225.fna ]
+fna="$(grep -c "^>" nc0225.fna)"
+[ $genes -eq $fna ]
 [ -s nc0225.faa ]
+faa="$(grep -c "^>" nc0225.faa)"
+[ $proteins -eq $faa ]
 
+##################################################################
 echo '---asn2gb test---'
-/usr/bin/asn2gb -i nc0225.aso -b -a t -o nc0225.gbk
+##################################################################
+/usr/bin/asn2gb -i nc0225.text -a t -o nc0225.gbk
 [ -s nc0225.gbk ]
+gbk="$(grep -c "^LOCUS " nc0225.gbk)"
+[ $genes -eq $gbk ]
+
 
 echo '---asn2idx test---'
-/usr/bin/asn2idx -b -p . < nc0225.aso
+/usr/bin/asn2idx -p . -x .text < nc0225.text
 [ -s nc0225.idx ]
 [ -s master.idx ]
 
 echo '---asn2xml test---'
-/usr/bin/asn2xml -i nc0225.aso -o nc0225.xml
+/usr/bin/asn2xml -i nc0225.text -b F -o nc0225.xml
 [ -s nc0225.xml ]
 
 echo '---asndisc test---'
-/usr/bin/asndisc -i nc0225.aso -b -a t -o nc0225.disc
+/usr/bin/asndisc -i nc0225.text -a t -o nc0225.disc
 [ -s nc0225.disc ]
 
 echo '---asnval test---'
-/usr/bin/asnval -i nc0225.aso -b -a t -o nc0225.val
-[ -f nc0225.val ]
-[ ! -s nc0225.val ] # empty
+/usr/bin/asnval -i nc0225.text -a t -o nc0225.val -Q 2
+[ -s nc0225.val ]
 
 echo '---asnmacro test---'
-/usr/bin/asnmacro -i nc0225.aso -b -m autofix.prt -o asnmacro.output
+/usr/bin/asnmacro -i nc0225.text -m autofix.prt -o asnmacro.output
 [ -s asnmacro.output ]
 
 echo '---asntool test---'
@@ -59,8 +85,8 @@ echo '---asntool test---'
 [ -s asntool.output ]
 
 echo '---cleanasn test---'
-/usr/bin/cleanasn -b -a t -D t -i nc0225.aso -o nc0225_cleaned.aso
-[ -s nc0225_cleaned.aso ]
+/usr/bin/cleanasn -a t -D t -i nc0225.text -o nc0225_cleaned.text
+[ -s nc0225_cleaned.text ]
 
 echo '---debruijn test---'
 /usr/bin/debruijn -a ncbistdaa -n 4 > debruijn.output
@@ -70,9 +96,9 @@ echo '---gene2xml test---'
 /usr/bin/gene2xml -b -i dsRNA_viruses.ags -o dsRNA_viruses.xgs
 [ -s dsRNA_viruses.xgs ]
 
-grep 'GI:' nc0225.gbk | head | sed 's/.*GI://' > GIs.txt
 # _insdseqget_ and _idfetch_ testing requires internet connection.
 # Comment the lines below to skip the testing.
+grep 'GI:' nc0225.gbk | head | sed 's/.*GI://' > GIs.txt
 echo '---insdseqget test---'
 /usr/bin/insdseqget -n -i GIs.txt > insdset.xml
 [ -s insdset.xml ]



View it on GitLab: https://salsa.debian.org/med-team/ncbi-tools6/commit/6576aed1e8963efbf350b53b881fa5f6413887d3

---
View it on GitLab: https://salsa.debian.org/med-team/ncbi-tools6/commit/6576aed1e8963efbf350b53b881fa5f6413887d3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-commit/attachments/20180408/7d99e71a/attachment-0001.html>


More information about the debian-med-commit mailing list