File: runner

package info (click to toggle)
pkg-perl-tools 0.36
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 568 kB
  • ctags: 175
  • sloc: sh: 2,651; perl: 1,958; makefile: 125; python: 18
file content (32 lines) | stat: -rwxr-xr-x 679 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

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

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

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

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

EXITCODE=0
for T in $(run-parts --list --regex '(^[a-z0-9.]+$)' ${TESTDIR} | \
           grep -v -F -f "$SKIPTMP") ; do
    if echo "$T" | grep -q '\.t$'
    then
        prove --norc -v "$T"
        RET=$?
        if [ $EXITCODE = 0 ]; then EXITCODE=$RET; fi
    else
        "$T"
        RET=$?
        if [ $EXITCODE = 0 ]; then EXITCODE=$RET; fi
    fi
done
rm -f "$SKIPTMP"
exit $EXITCODE