Commit fac5500e authored by Liubov Chuprikova's avatar Liubov Chuprikova
Browse files

Autopkgtest: check if NCBI is available to start testing

parent c44833bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
Tests: run-unit-test
Depends: @
Depends: netcat, @
Restrictions: allow-stderr
+16 −15
Original line number Diff line number Diff line
@@ -113,21 +113,22 @@ end_out="$(grep -c "<Object-id_id>${last_id}</Object-id_id>" dsRNA_viruses.xgs)"
[ $end_in -eq $end_out ]


## _insdseqget_ and _idfetch_ testing requires internet connection.
## Uncomment the lines below to run the tests provided.
#grep 'GI:' nc0225.gbk | head | sed 's/.*GI://' > GIs.txt
###################################################################
#echo '---insdseqget test---'
###################################################################
#/usr/bin/insdseqget -i GIs.txt > insdset.xml
#[ -s insdset.xml ]
#check_GI insdset.xml GIs.txt
###################################################################
#echo '---idfetch test---'
###################################################################
#/usr/bin/idfetch -G GIs.txt -o idfetch.text
#[ -s idfetch.text ]
#check_GI idfetch.text GIs.txt
if nc -z -w 1 www.ncbi.nlm.nih.gov 80; then
	grep 'GI:' nc0225.gbk | head | sed 's/.*GI://' > GIs.txt

	##################################################################
	echo '---insdseqget test---'
	##################################################################
	/usr/bin/insdseqget -i GIs.txt > insdset.xml
	[ -s insdset.xml ]
	check_GI insdset.xml GIs.txt
	##################################################################
	echo '---idfetch test---'
	##################################################################
	/usr/bin/idfetch -G GIs.txt -o idfetch.text
	[ -s idfetch.text ]
	check_GI idfetch.text GIs.txt
fi


##################################################################