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"
|