DIRS = cups $(BUILDDIRS)
+#
+# Test suite options - normally blank, override with make command...
+#
+
+TESTOPTIONS =
+
+
#
# Make all targets...
#
test: all unittests
echo Running CUPS test suite...
- cd test; ./run-stp-tests.sh
+ cd test; ./run-stp-tests.sh $(TESTOPTIONS)
check: all unittests
# attributes-natural-language
# printer-uri/job-uri
#
-# Copyright © 2007-2013 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
#
# Verify that the CUPS printer operations work.
#
-# Copyright © 2007-2014 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
#
# Verify that the IPP job operations work.
#
-# Copyright © 2007-2013 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
ATTR name requesting-user-name $user
ATTR name job-sheets "none\,none"
- FILE testfile.ps
+ FILE ../examples/testfile.ps
# What statuses are OK?
STATUS client-error-bad-request
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ATTR name requesting-user-name $user
- FILE testfile.ps
+ FILE ../examples/testfile.ps
# What statuses are OK?
STATUS successful-ok
GROUP subscription
ATTR uri notify-recipient-uri testnotify:///
- FILE testfile.jpg
+ FILE ../examples/testfile.jpg
# What statuses are OK?
STATUS successful-ok
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ATTR name requesting-user-name $user
- FILE testfile.txt
+ FILE ../examples/testfile.txt
# What statuses are OK?
STATUS successful-ok
GROUP job
ATTR keyword job-hold-until weekend
- FILE testfile.pdf
+ FILE ../examples/testfile.pdf
# What statuses are OK?
STATUS successful-ok
GROUP job
ATTR keyword job-hold-until indefinite
- FILE testfile.jpg
+ FILE ../examples/testfile.jpg
# What statuses are OK?
STATUS successful-ok
#
# Verify that the CUPS subscription operations work.
#
-# Copyright © 2007-2013 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
#
# Test the lpstat command.
#
-# Copyright © 2007-2017 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2005 by Easy Software Products, all rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
#
# Test the lp command.
#
-# Copyright © 2007-2014 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2005 by Easy Software Products, all rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
echo "LP Default Test"
echo ""
echo " lp testfile.pdf"
-$runcups $VALGRIND ../systemv/lp testfile.pdf 2>&1
+$runcups $VALGRIND ../systemv/lp ../examples/testfile.pdf 2>&1
if test $? != 0; then
echo " FAILED"
exit 1
echo "LP Destination Test"
echo ""
echo " lp -d Test3 -o fit-to-page testfile.jpg"
-$runcups $VALGRIND ../systemv/lp -d Test3 -o fit-to-page testfile.jpg 2>&1
+$runcups $VALGRIND ../systemv/lp -d Test3 -o fit-to-page ../examples/testfile.jpg 2>&1
if test $? != 0; then
echo " FAILED"
exit 1
echo "LP Options Test"
echo ""
echo " lp -d Test1 -P 1-4 -o job-sheets=classified,classified testfile.pdf"
-$runcups $VALGRIND ../systemv/lp -d Test1 -P 1-4 -o job-sheets=classified,classified testfile.pdf 2>&1
+$runcups $VALGRIND ../systemv/lp -d Test1 -P 1-4 -o job-sheets=classified,classified ../examples/testfile.pdf 2>&1
if test $? != 0; then
echo " FAILED"
exit 1
while test $i -lt $1; do
j=1
while test $j -le $2; do
- $runcups $VALGRIND ../systemv/lp -d test-$j testfile.jpg 2>&1
+ $runcups $VALGRIND ../systemv/lp -d test-$j ../examples/testfile.jpg 2>&1
j=`expr $j + 1`
done
- $runcups $VALGRIND ../systemv/lp -d Test1 testfile.jpg 2>&1 &
+ $runcups $VALGRIND ../systemv/lp -d Test1 ../examples/testfile.jpg 2>&1 &
pids="$pids $!"
- $runcups $VALGRIND ../systemv/lp -d Test2 testfile.jpg 2>&1 &
+ $runcups $VALGRIND ../systemv/lp -d Test2 ../examples/testfile.jpg 2>&1 &
pids="$pids $!"
i=`expr $i + 1`
#
# Test the lpr command.
#
-# Copyright © 2007-2014 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2005 by Easy Software Products, all rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
echo "LPR Default Test"
echo ""
echo " lpr testfile.pdf"
-$runcups $VALGRIND ../berkeley/lpr testfile.pdf 2>&1
+$runcups $VALGRIND ../berkeley/lpr ../examples/testfile.pdf 2>&1
if test $? != 0; then
echo " FAILED"
exit 1
echo "LPR Destination Test"
echo ""
echo " lpr -P Test3 -o fit-to-page testfile.jpg"
-$runcups $VALGRIND ../berkeley/lpr -P Test3 -o fit-to-page testfile.jpg 2>&1
+$runcups $VALGRIND ../berkeley/lpr -P Test3 -o fit-to-page ../examples/testfile.jpg 2>&1
if test $? != 0; then
echo " FAILED"
exit 1
echo "LPR Options Test"
echo ""
echo " lpr -P Test1 -o number-up=4 -o job-sheets=standard,none testfile.pdf"
-$runcups $VALGRIND ../berkeley/lpr -P Test1 -o number-up=4 -o job-sheets=standard,none testfile.pdf 2>&1
+$runcups $VALGRIND ../berkeley/lpr -P Test1 -o number-up=4 -o job-sheets=standard,none ../examples/testfile.pdf 2>&1
if test $? != 0; then
echo " FAILED"
exit 1
while test $i -lt $1; do
j=1
while test $j -le $2; do
- $runcups $VALGRIND ../berkeley/lpr -P test-$j testfile.jpg 2>&1
+ $runcups $VALGRIND ../berkeley/lpr -P test-$j ../examples/testfile.jpg 2>&1
j=`expr $j + 1`
done
- $runcups $VALGRIND ../berkeley/lpr -P Test1 testfile.jpg 2>&1 &
+ $runcups $VALGRIND ../berkeley/lpr -P Test1 ../examples/testfile.jpg 2>&1 &
pids="$pids $!"
- $runcups $VALGRIND ../berkeley/lpr -P Test2 testfile.jpg 2>&1 &
+ $runcups $VALGRIND ../berkeley/lpr -P Test2 ../examples/testfile.jpg 2>&1 &
pids="$pids $!"
i=`expr $i + 1`
#
# Test the lprm command.
#
-# Copyright © 2007-2011 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2005 by Easy Software Products, all rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
echo "LPRM Current Test"
echo ""
echo " lpr -o job-hold-until=indefinite testfile.jpg"
-$runcups $VALGRIND ../berkeley/lpr -o job-hold-until=indefinite testfile.jpg 2>&1
+$runcups $VALGRIND ../berkeley/lpr -o job-hold-until=indefinite ../examples/testfile.jpg 2>&1
echo " lprm"
$runcups $VALGRIND ../berkeley/lprm 2>&1
if test $? != 0; then
echo "LPRM Destination Test"
echo ""
echo " lpr -P Test1 -o job-hold-until=indefinite testfile.jpg"
-$runcups $VALGRIND ../berkeley/lpr -P Test1 -o job-hold-until=indefinite testfile.jpg 2>&1
+$runcups $VALGRIND ../berkeley/lpr -P Test1 -o job-hold-until=indefinite ../examples/testfile.jpg 2>&1
echo " lprm Test1"
$runcups $VALGRIND ../berkeley/lprm Test1 2>&1
if test $? != 0; then
#
# Test the cancel command.
#
-# Copyright © 2007-2013 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2006 by Easy Software Products, all rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
echo "Cancel Destination Test"
echo ""
echo " lp -d Test1 -o job-hold-until=indefinite testfile.jpg"
-$runcups $VALGRIND ../systemv/lp -d Test1 -o job-hold-until=indefinite testfile.jpg 2>&1
+$runcups $VALGRIND ../systemv/lp -d Test1 -o job-hold-until=indefinite ../examples/testfile.jpg 2>&1
echo " cancel Test1"
$runcups $VALGRIND ../systemv/cancel Test1 2>&1
if test $? != 0; then
#
# Test the lpinfo command.
#
-# Copyright © 2007-2011 by Apple Inc.
+# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2005 by Easy Software Products, all rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
echo " <pre>" >>$strfile
fail=0
-for file in 4*.test ipp-2.1.test; do
- echo $ac_n "Performing $file: $ac_c"
+for file in 4*.test ../examples/ipp-2.1.test; do
+ echo $ac_n "Performing `basename $file`: $ac_c"
echo "" >>$strfile
echo $ac_n "`date '+[%d/%b/%Y:%H:%M:%S %z]'` $ac_c" >>$strfile
- if test $file = ipp-2.1.test; then
+ if test $file = ../examples/ipp-2.1.test; then
uri="ipp://localhost:$port/printers/Test1"
options="-V 2.1 -d NOPRINT=1 -f testfile.ps"
else
uri="ipp://localhost:$port/printers"
options=""
fi
- $runcups $VALGRIND ./ipptool -tI $options $uri $file >> $strfile
+ $runcups $VALGRIND ../tools/ipptool -tI $options $uri $file >> $strfile
status=$?
if test $status != 0; then
echo " lp -d Test1 testfile.jpg" >>$strfile
-$runcups ../systemv/lp -d Test1 testfile.jpg 2>&1 >>$strfile
+$runcups ../systemv/lp -d Test1 ../examples/testfile.jpg 2>&1 >>$strfile
if test $? != 0; then
echo "FAIL (unable to queue test job)"
echo " FAILED" >>$strfile
#
# Script to wait for jobs to complete.
#
-# Copyright © 2008-2009 by Apple Inc.
+# Copyright © 2008-2019 by Apple Inc.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.