forked from tolsen/litmus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlitmus.in
58 lines (47 loc) · 1.23 KB
/
litmus.in
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
#!/bin/sh
# Copyright (c) 2001-2005 Joe Orton <[email protected]>
prefix=@prefix@
exec_prefix=@prefix@
libexecdir=@libexecdir@
datadir=@datadir@
HTDOCS=${HTDOCS-"@datadir@/litmus/htdocs"}
TESTROOT=${TESTROOT-"@libexecdir@/litmus"}
TESTS=${TESTS-"@TESTS@"}
usage() {
cat <<EOF
litmus: Usage: $0 [OPTIONS] URL [USERNAME PASSWORD]
Options:
-k, --keep-going carry on testing even if one suite fails
-p, --proxy=URL use given proxy server URL
Significant environment variables:
\$TESTS - specify test programs to run
default: "@TESTS@"
\$HTDOCS - specify alternate document root
default: @datadir@/litmus/htdocs
\$TESTROOT - specify alternate program directory
default: @libexecdir@/litmus
Feedback to <[email protected]>.
EOF
exit 1
}
nofail=0
case $1 in
--help|-h) usage ;;
--keep-going|-k) nofail=1; shift ;;
--version) echo litmus @PACKAGE_VERSION@; exit 0 ;;
esac
test "$#" = "0" && usage
for t in $TESTS; do
tprog="${TESTROOT}/${t}"
if test -x ${tprog}; then
if ${tprog} --htdocs ${HTDOCS} "$@"; then
: pass
elif test $nofail -eq 0; then
echo "See debug.log for network/debug traces."
exit 1
fi
else
echo "ERROR: Could not find ${tprog}"
exit 1
fi
done