[med-svn] r17934 - in trunk/packages/bowtie/trunk/debian: . tests
Andreas Tille
tille at moszumanska.debian.org
Wed Sep 3 09:47:54 UTC 2014
Author: tille
Date: 2014-09-03 09:47:54 +0000 (Wed, 03 Sep 2014)
New Revision: 17934
Added:
trunk/packages/bowtie/trunk/debian/tests/
trunk/packages/bowtie/trunk/debian/tests/control
trunk/packages/bowtie/trunk/debian/tests/example1.out
trunk/packages/bowtie/trunk/debian/tests/example2.out
trunk/packages/bowtie/trunk/debian/tests/example3.out
trunk/packages/bowtie/trunk/debian/tests/example4.out
trunk/packages/bowtie/trunk/debian/tests/example5.out
trunk/packages/bowtie/trunk/debian/tests/example6.out
trunk/packages/bowtie/trunk/debian/tests/example7.out
trunk/packages/bowtie/trunk/debian/tests/example8.out
trunk/packages/bowtie/trunk/debian/tests/example9.out
trunk/packages/bowtie/trunk/debian/tests/run-unit-test
Modified:
trunk/packages/bowtie/trunk/debian/changelog
trunk/packages/bowtie/trunk/debian/rules
Log:
Add unit tests for build time and autopkgtest
Modified: trunk/packages/bowtie/trunk/debian/changelog
===================================================================
--- trunk/packages/bowtie/trunk/debian/changelog 2014-09-03 08:28:26 UTC (rev 17933)
+++ trunk/packages/bowtie/trunk/debian/changelog 2014-09-03 09:47:54 UTC (rev 17934)
@@ -4,6 +4,7 @@
to other architectures
* Add README.Debian informing users about the fact that we ignore copy
of cpuid.h
+ * Add unit tests for build time and autopkgtest
-- Andreas Tille <tille at debian.org> Wed, 03 Sep 2014 09:50:22 +0200
Modified: trunk/packages/bowtie/trunk/debian/rules
===================================================================
--- trunk/packages/bowtie/trunk/debian/rules 2014-09-03 08:28:26 UTC (rev 17933)
+++ trunk/packages/bowtie/trunk/debian/rules 2014-09-03 09:47:54 UTC (rev 17934)
@@ -38,5 +38,10 @@
rm -f .bowtie*
dh_auto_clean
+override_dh_auto_test:
+ ln -s debian/tests
+ sh debian/tests/run-unit-test test_at_build_time
+ rm -f tests examples[0-9].out
+
get-orig-source:
uscan --verbose --force-download --repack --compress xz
Added: trunk/packages/bowtie/trunk/debian/tests/control
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/control (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/control 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, bowtie-examples
+Restrictions: allow-stderr
Added: trunk/packages/bowtie/trunk/debian/tests/example1.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example1.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example1.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,5 @@
+- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
+- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
+- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
++ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
Added: trunk/packages/bowtie/trunk/debian/tests/example2.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example2.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example2.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,3 @@
+- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
+- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
Added: trunk/packages/bowtie/trunk/debian/tests/example3.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example3.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example3.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,5 @@
+- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
+- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
+- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
++ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
Added: trunk/packages/bowtie/trunk/debian/tests/example4.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example4.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example4.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1 @@
+- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
Added: trunk/packages/bowtie/trunk/debian/tests/example5.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example5.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example5.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,5 @@
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
++ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
+- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
+- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
+- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
Added: trunk/packages/bowtie/trunk/debian/tests/example6.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example6.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example6.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1 @@
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
Added: trunk/packages/bowtie/trunk/debian/tests/example7.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example7.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example7.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1 @@
+No alignments
Added: trunk/packages/bowtie/trunk/debian/tests/example8.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example8.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example8.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,5 @@
+- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
+- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
+- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
++ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
Added: trunk/packages/bowtie/trunk/debian/tests/example9.out
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/example9.out (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/example9.out 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1 @@
+- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
Added: trunk/packages/bowtie/trunk/debian/tests/run-unit-test
===================================================================
--- trunk/packages/bowtie/trunk/debian/tests/run-unit-test (rev 0)
+++ trunk/packages/bowtie/trunk/debian/tests/run-unit-test 2014-09-03 09:47:54 UTC (rev 17934)
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+
+if [ "$1" = "test_at_build_time" ] ; then
+ export PATH=.:$PATH
+else
+ pkg=bowtie
+ if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+ fi
+ mkdir -p $ADTTMP/tests
+ cp -a example* $ADTTMP/tests
+ cd $ADTTMP
+ cp -a /usr/share/doc/bowtie/examples/indexes $ADTTMP
+fi
+
+check_result () {
+ EDIFF=`diff -u tests/$1.out $1.out`
+ if ! $EDIFF ; then
+ echo "Error testing example"
+ echo $EDIFF
+ exit 1
+ else
+ echo "$1 OK"
+ fi
+}
+
+bowtie -a -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example1.out
+check_result example1
+bowtie -k 3 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example2.out
+check_result example2
+bowtie -k 6 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example3.out
+check_result example3
+bowtie -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example4.out
+check_result example4
+bowtie -a --best -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example5.out
+# check_result example5
+echo "There is a known difference between the manual and the test result"
+diff -u tests/example5.out example5.out
+bowtie -a --best --strata -v 2 --suppress 1,5,6,7 e_coli -c ATGCATCATGCGCCAT > example6.out
+check_result example6
+# The "No alignments" string is the end of stderr output
+bowtie -a -m 3 -v 2 e_coli -c ATGCATCATGCGCCAT 2>&1 | tee | tail -n1 > example7.out
+check_result example7
+bowtie -a -m 5 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example8.out
+check_result example8
+bowtie -a -m 3 --best --strata -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT > example9.out
+check_result example9
More information about the debian-med-commit
mailing list