Commit 474ec7bc authored by Liubov Chuprikova's avatar Liubov Chuprikova
Browse files

Autopkgtest: improved one test, amended README.test

parent d4460962
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,6 +3,6 @@ _______________________________________

This package can be tested by execution

	sh run-unit-test
	bash run-unit-test

in order to confirm its integrity.
+16 −11
Original line number Diff line number Diff line
@@ -14,6 +14,13 @@ cp /usr/share/ncbi/data/autofix.prt .
cp /usr/share/ncbi/data/UniVec.* .
gunzip *.gz

check_GI()
{
	while read GI; do
		grep -q $GI $1
	done < $2
}

##################################################################
echo '---asn2asn test---'
##################################################################
@@ -58,6 +65,15 @@ echo '---asn2gb test---'
gbk="$(grep -c "^LOCUS " nc0225.gbk)"
[ $genes -eq $gbk ]

##################################################################
echo '---asn2idx test---'
##################################################################
/usr/bin/asn2idx -p . -x .text < nc0225.text
[ -s nc0225.idx ]
[ -s master.idx ]
awk 'NR == 1 || NR % 50 == 0 {print $1}' nc0225.idx | sed 's/\.1//' > indexed_GIs
check_GI nc0225.text indexed_GIs

##################################################################
echo '---asn2xml test---'
##################################################################
@@ -100,12 +116,6 @@ end_out="$(grep -c "<Object-id_id>${last_id}</Object-id_id>" dsRNA_viruses.xgs)"
# _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
check_GI()
{
	while read GI; do
		grep -q $GI $1
	done < $2
}
##################################################################
echo '---insdseqget test---'
##################################################################
@@ -130,11 +140,6 @@ last_out="$(grep ">" vecscreen.output | tail -1 | sed 's/>Vector //' | sed 's/ .
[ $last_in==$last_out ]


echo '---asn2idx test---'
/usr/bin/asn2idx -p . -x .text < nc0225.text
[ -s nc0225.idx ]
[ -s master.idx ]

echo '---asndisc test---'
/usr/bin/asndisc -i nc0225.text -a t -o nc0225.disc
[ -s nc0225.disc ]