[med-svn] r16770 - in trunk/packages/python-biopython/trunk/debian: . tests
Andreas Tille
tille at moszumanska.debian.org
Thu Apr 24 11:10:29 UTC 2014
Author: tille
Date: 2014-04-24 11:10:29 +0000 (Thu, 24 Apr 2014)
New Revision: 16770
Added:
trunk/packages/python-biopython/trunk/debian/README.test
trunk/packages/python-biopython/trunk/debian/tests/run-unit-test
Removed:
trunk/packages/python-biopython/trunk/debian/tests/upstream
Modified:
trunk/packages/python-biopython/trunk/debian/clean
trunk/packages/python-biopython/trunk/debian/python-biopython-doc.docs
trunk/packages/python-biopython/trunk/debian/rules
trunk/packages/python-biopython/trunk/debian/tests/control
Log:
Enhance autopkgtest and add README.test
Added: trunk/packages/python-biopython/trunk/debian/README.test
===================================================================
--- trunk/packages/python-biopython/trunk/debian/README.test (rev 0)
+++ trunk/packages/python-biopython/trunk/debian/README.test 2014-04-24 11:10:29 UTC (rev 16770)
@@ -0,0 +1,10 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+You can run the upstream unit test by executing the script run-unit-test.
+
+If you are interested in running some remaining tests which are excluded
+for different reasons from the Debian packaging you might try your luck
+in Tests_avoid.
+
+ -- Andreas Tille <tille at debian.org> Thu, 06 Mar 2014 11:51:27 +0100
Modified: trunk/packages/python-biopython/trunk/debian/clean
===================================================================
--- trunk/packages/python-biopython/trunk/debian/clean 2014-04-24 09:18:04 UTC (rev 16769)
+++ trunk/packages/python-biopython/trunk/debian/clean 2014-04-24 11:10:29 UTC (rev 16770)
@@ -4,3 +4,4 @@
Tests/Clustalw/temp*
Tests/Graphics/*.*
Tests/output.*
+debian/tmp_tests
Modified: trunk/packages/python-biopython/trunk/debian/python-biopython-doc.docs
===================================================================
--- trunk/packages/python-biopython/trunk/debian/python-biopython-doc.docs 2014-04-24 09:18:04 UTC (rev 16769)
+++ trunk/packages/python-biopython/trunk/debian/python-biopython-doc.docs 2014-04-24 11:10:29 UTC (rev 16770)
@@ -1,2 +1,4 @@
Doc/
-Tests/
+debian/tmp_tests/*
+debian/README.test
+debian/tests/run-unit-test
Modified: trunk/packages/python-biopython/trunk/debian/rules
===================================================================
--- trunk/packages/python-biopython/trunk/debian/rules 2014-04-24 09:18:04 UTC (rev 16769)
+++ trunk/packages/python-biopython/trunk/debian/rules 2014-04-24 11:10:29 UTC (rev 16770)
@@ -38,6 +38,13 @@
; do \
mv Tests/test_$${avoid}.py Tests_avoid ; \
done
+ # For the doc package we need a clean testsuite without all the remaining files. So keep a clean copy here
+ mkdir -p debian/tmp_tests
+ cp -a Tests debian/tmp_tests
+ # remove duplicated file
+ rm -f debian/tmp_tests/Tests/Quality/example.fastq.gz
+ # We also keep the tests we need to avoid for later inspection
+ cp -a Tests_avoid debian/tmp_tests
# in the Debian package dialign it is not needed to set DIALIGN2_DIR but the test is verifying this dir
# to run the EMBOSS test test_Emboss also requires to have the environment variable EMBOSS_ROOT set
# dh_auto_test -- --test --system=custom --test-args='env DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss PYTHONPATH={build_dir} {interpreter} setup.py test'
@@ -49,6 +56,7 @@
override_dh_installdocs:
dh_installdocs
find debian -name __pycache__ -type d | xargs rm -rf
+ find debian -name example.fastq.gz
override_dh_auto_clean:
dh_auto_clean
@@ -56,3 +64,4 @@
mv Tests_avoid/* Tests ; \
rmdir Tests_avoid ; \
fi
+ rm -rf debian/tmp_tests
Modified: trunk/packages/python-biopython/trunk/debian/tests/control
===================================================================
--- trunk/packages/python-biopython/trunk/debian/tests/control 2014-04-24 09:18:04 UTC (rev 16769)
+++ trunk/packages/python-biopython/trunk/debian/tests/control 2014-04-24 11:10:29 UTC (rev 16770)
@@ -1,2 +1,2 @@
-Tests: upstream
+Tests: run-unit-test
Depends: @builddeps@
Added: trunk/packages/python-biopython/trunk/debian/tests/run-unit-test
===================================================================
--- trunk/packages/python-biopython/trunk/debian/tests/run-unit-test (rev 0)
+++ trunk/packages/python-biopython/trunk/debian/tests/run-unit-test 2014-04-24 11:10:29 UTC (rev 16770)
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/python-biopython-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/python-biopython-doc/Tests $ADTTMP
+mkdir -p Doc
+cp -a /usr/share/doc/python-biopython-doc/Doc/Tutorial.tex* Doc
+gunzip -r */*.gz Tests/*/*.gz
+cd Tests
+
+# bwa is only available on amd64
+BUILDARCH=
+if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" != "amd64" ]; then
+ rm -f test_BWA_tool.py
+fi
+
+# execute tests
+################################################################################
+# in the Debian package dialign it is not needed to set DIALIGN2_DIR but the
+# test is verifying this dir to run the EMBOSS test
+# test_Emboss also requires to have the environment variable EMBOSS_ROOT set
+
+for pi in $(pyversions -i) $(py3versions -i); do
+ DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss ${pi} run_tests.py
+done
+
Deleted: trunk/packages/python-biopython/trunk/debian/tests/upstream
===================================================================
--- trunk/packages/python-biopython/trunk/debian/tests/upstream 2014-04-24 09:18:04 UTC (rev 16769)
+++ trunk/packages/python-biopython/trunk/debian/tests/upstream 2014-04-24 11:10:29 UTC (rev 16770)
@@ -1,72 +0,0 @@
-#!/bin/sh -e
-
-if [ "$ADTTMP" = "" ] ; then
- ADTTMP=`mktemp -d /tmp/python-biopython-test.XXXXXX`
-fi
-cd $ADTTMP
-cp -a /usr/share/doc/python-biopython-doc/Tests/* $ADTTMP
-gunzip -r *.gz
-
-
-################################################################################
-# 1. avoid some tests which need online access
-# 2. avoid tests needing a ready setup database server (MySQL and PostgreSQL)
-# 3. avoid PAML_tools and EmbossPhylipNew since paml resp. embassy-phylip are non-free
-# 4. avoid testing tools that are not packaged for Debian yet
-# 5. avoid amd64 only tools on other architectures
-#
-# While 2. and 3. do not create errors there is no point in bloating
-# the build log and this kind of documentation makes things more transparent
-################################################################################
-
-# definitions
-################################################################################
-
-BUILDARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
-
-EXCLUDE="Entrez_online"
-EXCLUDE="$EXCLUDE:HotRand"
-EXCLUDE="$EXCLUDE:NCBI_qblast"
-EXCLUDE="$EXCLUDE:SCOP_online"
-EXCLUDE="$EXCLUDE:SeqIO_online"
-EXCLUDE="$EXCLUDE:TogoWS"
-EXCLUDE="$EXCLUDE:BioSQL_MySQLdb"
-EXCLUDE="$EXCLUDE:BioSQL_psycopg2"
-EXCLUDE="$EXCLUDE:PAML_tools"
-EXCLUDE="$EXCLUDE:EmbossPhylipNew"
-EXCLUDE="$EXCLUDE:MSAProbs_tool"
-EXCLUDE="$EXCLUDE:NACCESS_tool"
-EXCLUDE="$EXCLUDE:PopGen_DFDist"
-EXCLUDE="$EXCLUDE:PopGen_FDist"
-EXCLUDE="$EXCLUDE:PopGen_GenePop"
-EXCLUDE="$EXCLUDE:PopGen_GenePop_EasyController"
-EXCLUDE="$EXCLUDE:PopGen_SimCoal"
-EXCLUDE="$EXCLUDE:XXmotif_tool"
-
-if [ "x$BUILDARCH" = "xamd64" ]; then
- EXCLUDE="$EXCLUDE:BWA_tool"
-fi
-
-# move excluded tests
-################################################################################
-
-mkdir -p Tests_avoid
-for i in $(echo $EXCLUDE | tr ':' '\n'); do \
- mv Tests/test_${i}.py Tests_avoid ; \
-done
-
-# execute tests
-################################################################################
-# in the Debian package dialign it is not needed to set DIALIGN2_DIR but the
-# test is verifying this dir to run the EMBOSS test
-# test_Emboss also requires to have the environment variable EMBOSS_ROOT set
-
-for pi in $(pyversions -i) $(py3versions -i); do
- DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss ${pi} run_tests.py
-done
-
-# restore test directory
-################################################################################
-
-#mv Tests_avoid/* Tests
-#rmdir Tests_avoid
More information about the debian-med-commit
mailing list