File: run-unit-test

package info (click to toggle)
python-biopython 1.85%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 126,372 kB
  • sloc: xml: 1,047,995; python: 332,722; ansic: 16,944; sql: 1,208; makefile: 140; sh: 81
file content (56 lines) | stat: -rw-r--r-- 2,134 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh -e

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/python-biopython-test.XXXXXX`
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

# Preconfigure CCD data bank for test_PDB* and dssp.
LIBCIFPP_DATA_DIR="$AUTOPKGTEST_TMP/libcifpp-data"
export LIBCIFPP_DATA_DIR
mkdir -p "$LIBCIFPP_DATA_DIR"
cp /usr/share/libcifpp/mmcif_pdbx.dic "$LIBCIFPP_DATA_DIR"
cp /usr/share/libcifpp/mmcif_ma.dic "$LIBCIFPP_DATA_DIR"
# Note that as mini-ccd.cif is shipped by python-biopython source
# package, this makes self testing python3-biopython impossible using
# only binary packages as a regular en user.
cp debian/tests/mini-ccd.cif "$LIBCIFPP_DATA_DIR/components.cif"

cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/python-biopython-doc/Tests $AUTOPKGTEST_TMP
mkdir -p Doc/
unset GZIP
find . -name "*.gz" -exec gunzip \{\} \;
SUBSMAT_DIR="Bio/Align/substitution_matrices/data"
mkdir -pv "$SUBSMAT_DIR/"
cp -av "/usr/lib/python3/dist-packages/$SUBSMAT_DIR"/* "$SUBSMAT_DIR/"
cd Tests
# we really need this gzipped duplicate of the example.fastq and E3MFGYR02_random_10_reads.sff files to pass the BGZF compression test
gzip --keep Quality/example.fastq
gzip --keep Roche/E3MFGYR02_random_10_reads.sff
gzip --keep Fasta/flowers.pro
gzip --keep PDB/1gbt.bcif
gzip --keep PDB/3jqh.bcif
gzip --keep PDB/6wg6.bcif

# bwa is only available on amd64
BUILDARCH=
if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" != "amd64" ]; then
    rm -f test_BWA_tool.py
fi

# FIXME: PDB bcif is currently broken on s390x
if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "s390x" ]; then
    rm -f test_PDB_binary_cif.py
    find . -name test_Tutorial.py -delete
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 $(py3versions -s); do
    LC_ALL=C.UTF-8 DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss HOME=$AUTOPKGTEST_TMP ${pi} run_tests.py --offline
done