| 1 |
#!/bin/sh -e |
| 2 |
export BOWTIE_INDEXES='indexes' |
| 3 |
|
| 4 |
if [ "$1" = "test_at_build_time" ] ; then |
| 5 |
export PATH=.:$PATH |
| 6 |
else |
| 7 |
pkg=bowtie |
| 8 |
if [ "$AUTOPKGTEST_TMP" = "" ] ; then |
| 9 |
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX` |
| 10 |
fi |
| 11 |
mkdir -p $AUTOPKGTEST_TMP/tests |
| 12 |
cp -a debian/tests/example* $AUTOPKGTEST_TMP/tests |
| 13 |
cd $AUTOPKGTEST_TMP |
| 14 |
cp -a /usr/share/doc/bowtie/examples/indexes $AUTOPKGTEST_TMP |
| 15 |
fi |
| 16 |
|
| 17 |
check_result () { |
| 18 |
EDIFF=`diff -u tests/$1.out $1.out` |
| 19 |
if ! $EDIFF ; then |
| 20 |
echo "Error testing example" |
| 21 |
echo $EDIFF |
| 22 |
exit 1 |
| 23 |
else |
| 24 |
echo "$1 OK" |
| 25 |
fi |
| 26 |
} |
| 27 |
|
| 28 |
bowtie -a -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example1.out |
| 29 |
check_result example1 |
| 30 |
bowtie -k 3 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example2.out |
| 31 |
check_result example2 |
| 32 |
bowtie -k 6 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example3.out |
| 33 |
check_result example3 |
| 34 |
bowtie -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example4.out |
| 35 |
check_result example4 |
| 36 |
bowtie -a --best -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example5.out |
| 37 |
# Please read README.Debian or |
| 38 |
# https://lists.debian.org/debian-med/2014/09/msg00031.html |
| 39 |
# to evaluate the result od this test. |
| 40 |
# check_result example5 |
| 41 |
# echo "There is a known difference between the manual and the test result" |
| 42 |
# diff -u tests/example5.out example5.out |
| 43 |
check_result example5 |
| 44 |
# Disabling test as the output of this version of bowtie differs from the older versions and |
| 45 |
# causes check_result to fail |
| 46 |
#bowtie -a --best --strata -v 2 --suppress 1,5,6,7 e_coli -c ATGCATCATGCGCCAT > example6.out |
| 47 |
#check_result example6 |
| 48 |
# The "No alignments" string is the end of stderr output |
| 49 |
bowtie -a -m 3 -v 2 e_coli -c ATGCATCATGCGCCAT 2>&1 | tee | tail -n1 > example7.out |
| 50 |
check_result example7 |
| 51 |
bowtie -a -m 5 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example8.out |
| 52 |
check_result example8 |
| 53 |
# Disabling test as the output of this version of bowtie differs from the older versions and |
| 54 |
# causes check_result to fail |
| 55 |
bowtie -a -m 3 --best --strata -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example9.out |
| 56 |
#check_result example9 |