File: run_failing_tests

package info (click to toggle)
python-biopython 1.68%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 46,860 kB
  • ctags: 13,237
  • sloc: python: 160,306; xml: 93,216; ansic: 9,118; sql: 1,208; makefile: 155; sh: 63
file content (51 lines) | stat: -rwxr-xr-x 1,464 bytes parent folder | download | duplicates (7)
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
#!/bin/sh
# This script copies those tests that were failing in the build process
# for no obvious reasons and the data needed by the tests into a temporary
# directory and runs them with all available Python interpreters

if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/python-biopython-failed-tests.XXXXXX`
fi

DOC=/usr/share/doc/python-biopython-doc/
DATA=$DOC/Tests
TESTS=$DOC/Tests_avoid

cd $ADTTMP
mkdir Doc
cp -a $DOC/Doc/Tutorial.tex*		Doc
mkdir Tests
cd Tests
cp -a $DATA/run_tests.py*		.
mkdir Clustalw
mkdir Fasta
cp -a $DATA/Fasta/f00[12]*		Fasta
mkdir GenBank
cp -a $DATA/GenBank/NC_005816.gb*	GenBank
mkdir Graphics
cp -a $DATA/Graphics/README*		Graphics
mkdir Medline
cp -a $DATA/Medline/pubmed_result1.txt*	Medline
mkdir Phylip
cp -a $DATA/Phylip/hennigian.phy*	Phylip
mkdir Quality
cp -a $DATA/Quality/example.fasta*	Quality

FAILINGTESTS="GenomeDiagram Fasttree_tool Mafft_tool Tutorial ColorSpiral trie"
for ft in $FAILINGTESTS ; do
    cp -a $TESTS/test_${ft}.py* .
done
find .. -name "*.gz" -exec gunzip \{\} \;

for ft in $FAILINGTESTS ; do
    for pi in $(pyversions -i) $(py3versions -i); do
        LC_ALL=C.UTF-8 $pi run_tests.py -v test_$ft 2>&1 | tee > ../${ft}_${pi}.log
        if grep -qwi fail ../${ft}_${pi}.log ; then
            echo "Test ${ft} with ${pi}: FAIL"
        else
            echo "Test ${ft} with ${pi}: ok"
        fi
    done
done
rm -fr *.pyc __pycache__
echo "Log files of tests can be found in $ADTTMP"