]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.5-lp.sh
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / test / 5.5-lp.sh
CommitLineData
ef416fc2 1#!/bin/sh
2#
503b54c9 3# Test the lp command.
ef416fc2 4#
503b54c9
MS
5# Copyright 2007-2014 by Apple Inc.
6# Copyright 1997-2005 by Easy Software Products, all rights reserved.
ef416fc2 7#
503b54c9
MS
8# These coded instructions, statements, and computer programs are the
9# property of Apple Inc. and are protected by Federal copyright
10# law. Distribution and use rights are outlined in the file "LICENSE.txt"
11# which should have been included with this file. If this file is
12# file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 13#
14
15echo "LP Default Test"
16echo ""
839a51c8 17echo " lp testfile.pdf"
a2326b5b 18$VALGRIND ../systemv/lp testfile.pdf 2>&1
ef416fc2 19if test $? != 0; then
20 echo " FAILED"
21 exit 1
22else
23 echo " PASSED"
24fi
25echo ""
26
27echo "LP Destination Test"
28echo ""
a29fd7dd
MS
29echo " lp -d Test3 -o fit-to-page testfile.jpg"
30$VALGRIND ../systemv/lp -d Test3 -o fit-to-page testfile.jpg 2>&1
839a51c8
MS
31if test $? != 0; then
32 echo " FAILED"
33 exit 1
34else
35 echo " PASSED"
36fi
37echo ""
38
39echo "LP Options Test"
40echo ""
41echo " lp -d Test1 -P 1-4 -o job-sheets=classified,classified testfile.pdf"
a2326b5b 42$VALGRIND ../systemv/lp -d Test1 -P 1-4 -o job-sheets=classified,classified testfile.pdf 2>&1
ef416fc2 43if test $? != 0; then
44 echo " FAILED"
45 exit 1
46else
47 echo " PASSED"
48fi
49echo ""
50
839a51c8 51echo "LP Flood Test ($1 times in parallel)"
ef416fc2 52echo ""
839a51c8
MS
53echo " lp -d Test1 testfile.jpg"
54echo " lp -d Test2 testfile.jpg"
ef416fc2 55i=0
2a8db0cd 56pids=""
ef416fc2 57while test $i -lt $1; do
b9faaae1
MS
58 j=1
59 while test $j -le $2; do
a2326b5b 60 $VALGRIND ../systemv/lp -d test-$j testfile.jpg 2>&1
b9faaae1
MS
61 j=`expr $j + 1`
62 done
63
a2326b5b 64 $VALGRIND ../systemv/lp -d Test1 testfile.jpg 2>&1 &
2a8db0cd 65 pids="$pids $!"
a2326b5b 66 $VALGRIND ../systemv/lp -d Test2 testfile.jpg 2>&1 &
2a8db0cd 67 pids="$pids $!"
b9faaae1 68
ef416fc2 69 i=`expr $i + 1`
70done
2a8db0cd 71wait $pids
ef416fc2 72if test $? != 0; then
73 echo " FAILED"
74 exit 1
75else
76 echo " PASSED"
77fi
78echo ""
79
839a51c8
MS
80./waitjobs.sh
81
eec1fbc3
MS
82echo "LPSTAT Completed Jobs Order Test"
83echo ""
84echo " lpstat -W completed -o"
85$VALGRIND ../systemv/lpstat -W completed -o | tee $BASE/lpstat-completed.txt
86if test "`uniq -d $BASE/lpstat-completed.txt`" != ""; then
87 echo " FAILED"
88 exit 1
89else
90 echo " PASSED"
91fi
92echo ""