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
|
#!/bin/sh -e
if [ "$ADTTMP" = "" ] ; then
ADTTMP=`mktemp -d /tmp/bedtools-test.XXXXXX`
fi
# Copy test suite there
cp -a /usr/share/bedtools/test $ADTTMP
# Link to genomes files
cd $ADTTMP
ln -s /usr/share/bedtools/genomes
# Enter the directory and run the tests
cd $ADTTMP/test
DATA=/usr/share/bedtools/data BT=/usr/bin/bedtools sh test.sh | tee test.sh.output
# Did it fail ?
TESTFAILED=0
grep -q fail test.sh.output && TESTFAILED=1
# Clean
cd
# rm -rf $ADTTMP/test
exit $TESTFAILED
|