#!/bin/sh -e

pkg=python-ruffus
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
mkdir ruffus
cd ruffus
cp -a /usr/share/doc/python-ruffus-doc/test .
cd test
find . -type f -name "*.gz" -exec gunzip \{\} \;
# mod +x [a-z]*.py

export LC_ALL=C.UTF-8
for testscript in run_all_unit_tests*.cmd ; do
    # exclude tests with known issues ... should not be needed any more since fix_test.patch
#    sed -i -e 's/\(unittest test_file_name_parameters.*\)\\/\1 true/' \
#           -e 's/\(unittest test_ruffus_utility.*\)\\/\1 true/' \
#        $testscript
    sh $testscript
done

# rm -f $ADTTMP/*
