blob: 050906abdbe44816bc1f4eb7de7ff4e4aa7f14b5 (
plain)
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
|
#!/bin/sh
status=0
verbose=0
strict=0
usage() {
echo "Usage: run-testpattern [-v] [-s]"
exit
}
set_args() {
while true ; do
case "$1" in
-h*|--h*) usage ;;
-v) verbose=1 ;;
-s) strict=1 ;;
--) shift; args="$@"; return ;;
*) return ;;
esac
shift
done
}
set_args `getopt vhs "$@"`
if [ -d ppd ] ; then
for f in ppd/* ; do
echo -n "$f..."
cupstestppd -r -q $f/*
if [ $? -ne 0 ] ; then
echo -n "FAILED"
if [ $verbose -ne 0 ] ; then
cupstestppd $f/* 2>&1 | grep FAIL
fi
status=1
else
cupstestppd -q $f/*
if [ $? -ne 0 ] ; then
# Don't actually error if strict checks fail.
# These errors are less important, and we'll accept them.
echo -n "WARNING: strict checks failed"
if [ $verbose -ne 0 ] ; then
cupstestppd $f/* 2>&1 | grep FAIL
fi
if [ $strict -ne 0 ] ; then
status=1
fi
fi
fi
echo
done
fi
exit $status
|