-
Notifications
You must be signed in to change notification settings - Fork 3
/
prove
executable file
·69 lines (55 loc) · 1.31 KB
/
prove
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# ripped out of the autotools-generated Makefile in tests
# eg: ./prove tests/targets-14
case $# in
0)
echo "Usage: $0 <tests-file>"
exit 1;
;;
esac
cd tests
p=`basename "$1"`
b=$p
case $- in *e*) set +e;; esac
srcdirstrip=`echo "." | sed 's|.|.|g'`
case $p in ./*) f=`echo "$p" | sed "s|^$srcdirstrip/||"`;; *) f=$p;; esac
{
am__color_tests=no
if test "X" = Xno
then am__color_tests=no
elif test "X" = Xalways
then am__color_tests=yes
elif test "X$TERM" != Xdumb && { test -t 1; } 2>/dev/null
then am__color_tests=yes
fi
}
srcdir=.
export srcdir
case "$p.log" in
*/*) am__odir=`echo "./$p.log" | sed 's|/[^/]*$||'`;;
*) am__odir=.;;
esac
test "x$am__odir" = x"." || test -d "$am__odir" || /bin/mkdir -p "$am__odir" || exit $?
if test -f "./$f"
then dir=./
elif test -f "$f"
then dir=
else dir="./"
fi
tst=$dir$f
log="$p.log"
if test -n ''
then am__enable_hard_errors=no
else am__enable_hard_errors=yes
fi
case " " in
*[\ \ ]$f[\ \ ]* | *[\ \ ]$dir$f[\ \ ]*) am__expect_failure=yes;;
*) am__expect_failure=no;;
esac
DMAKEPROG="../dmake" /bin/sh ../test-driver --test-name "$f" \
--log-file $log --trs-file $b.trs \
--color-tests "$am__color_tests" \
--enable-hard-errors "$am__enable_hard_errors" \
--expect-failure "$am__expect_failure" -- \
"$tst"
cat $log