runner 679 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
#!/bin/sh

BASE=/usr/share/pkg-perl-autopkgtest

TYPE=$1
[ -n "$TYPE" ] || exit 1

TESTDIR=${BASE}/${TYPE}.d
[ -d "$TESTDIR" ] || exit 1

11
SKIPLIST=debian/tests/pkg-perl/SKIP
12 13
SKIPTMP=$(mktemp)
if [ -f "$SKIPLIST" ]; then
14
    grep -v '^ *#' "$SKIPLIST" |grep -v '^ *$' > "$SKIPTMP"
15 16
fi

17
EXITCODE=0
18
for T in $(run-parts --list --regex '(^[a-z0-9.]+$)' ${TESTDIR} | \
19
           grep -v -F -f "$SKIPTMP") ; do
20 21
    if echo "$T" | grep -q '\.t$'
    then
22
        prove --norc -v "$T"
23 24
        RET=$?
        if [ $EXITCODE = 0 ]; then EXITCODE=$RET; fi
25 26
    else
        "$T"
27 28
        RET=$?
        if [ $EXITCODE = 0 ]; then EXITCODE=$RET; fi
29
    fi
30
done
31
rm -f "$SKIPTMP"
32
exit $EXITCODE