From feb13eeaf60f7f3823d648c1f97a263b17462552 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 26 Apr 2019 17:40:54 -0400 Subject: [PATCH 1/1] Update test suite for new location of test files. --- Makefile | 9 ++++++++- test/4.1-requests.test | 2 +- test/4.2-cups-printer-ops.test | 2 +- test/4.3-job-ops.test | 14 +++++++------- test/4.4-subscription-ops.test | 2 +- test/5.4-lpstat.sh | 2 +- test/5.5-lp.sh | 14 +++++++------- test/5.6-lpr.sh | 14 +++++++------- test/5.7-lprm.sh | 6 +++--- test/5.8-cancel.sh | 4 ++-- test/5.9-lpinfo.sh | 2 +- test/run-stp-tests.sh | 10 +++++----- test/waitjobs.sh | 2 +- 13 files changed, 45 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index ae6cf3774..30dfa6016 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,13 @@ include Makedefs DIRS = cups $(BUILDDIRS) +# +# Test suite options - normally blank, override with make command... +# + +TESTOPTIONS = + + # # Make all targets... # @@ -246,7 +253,7 @@ uninstall: test: all unittests echo Running CUPS test suite... - cd test; ./run-stp-tests.sh + cd test; ./run-stp-tests.sh $(TESTOPTIONS) check: all unittests diff --git a/test/4.1-requests.test b/test/4.1-requests.test index 8ff798f91..e6550545c 100644 --- a/test/4.1-requests.test +++ b/test/4.1-requests.test @@ -5,7 +5,7 @@ # 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 diff --git a/test/4.2-cups-printer-ops.test b/test/4.2-cups-printer-ops.test index 3fa2960d4..e13fcbb98 100644 --- a/test/4.2-cups-printer-ops.test +++ b/test/4.2-cups-printer-ops.test @@ -1,7 +1,7 @@ # # 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 diff --git a/test/4.3-job-ops.test b/test/4.3-job-ops.test index 37a5e1041..f92801f33 100644 --- a/test/4.3-job-ops.test +++ b/test/4.3-job-ops.test @@ -1,7 +1,7 @@ # # 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 @@ -23,7 +23,7 @@ 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 @@ -43,7 +43,7 @@ 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 @@ -96,7 +96,7 @@ GROUP subscription ATTR uri notify-recipient-uri testnotify:/// - FILE testfile.jpg + FILE ../examples/testfile.jpg # What statuses are OK? STATUS successful-ok @@ -147,7 +147,7 @@ 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 @@ -175,7 +175,7 @@ GROUP job ATTR keyword job-hold-until weekend - FILE testfile.pdf + FILE ../examples/testfile.pdf # What statuses are OK? STATUS successful-ok @@ -248,7 +248,7 @@ GROUP job ATTR keyword job-hold-until indefinite - FILE testfile.jpg + FILE ../examples/testfile.jpg # What statuses are OK? STATUS successful-ok diff --git a/test/4.4-subscription-ops.test b/test/4.4-subscription-ops.test index 80c888424..45c3ce12b 100644 --- a/test/4.4-subscription-ops.test +++ b/test/4.4-subscription-ops.test @@ -1,7 +1,7 @@ # # 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 diff --git a/test/5.4-lpstat.sh b/test/5.4-lpstat.sh index ba5246dfc..b8918c833 100644 --- a/test/5.4-lpstat.sh +++ b/test/5.4-lpstat.sh @@ -2,7 +2,7 @@ # # 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 diff --git a/test/5.5-lp.sh b/test/5.5-lp.sh index ba7c5f91b..03adc5ffd 100644 --- a/test/5.5-lp.sh +++ b/test/5.5-lp.sh @@ -2,7 +2,7 @@ # # 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 @@ -12,7 +12,7 @@ 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 @@ -24,7 +24,7 @@ echo "" 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 @@ -36,7 +36,7 @@ echo "" 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 @@ -54,13 +54,13 @@ pids="" 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` diff --git a/test/5.6-lpr.sh b/test/5.6-lpr.sh index 1a1908349..98c8d6963 100644 --- a/test/5.6-lpr.sh +++ b/test/5.6-lpr.sh @@ -2,7 +2,7 @@ # # 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 @@ -12,7 +12,7 @@ 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 @@ -24,7 +24,7 @@ echo "" 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 @@ -36,7 +36,7 @@ echo "" 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 @@ -54,13 +54,13 @@ pids="" 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` diff --git a/test/5.7-lprm.sh b/test/5.7-lprm.sh index 29251f943..8958deaa5 100644 --- a/test/5.7-lprm.sh +++ b/test/5.7-lprm.sh @@ -2,7 +2,7 @@ # # 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 @@ -12,7 +12,7 @@ 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 @@ -26,7 +26,7 @@ echo "" 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 diff --git a/test/5.8-cancel.sh b/test/5.8-cancel.sh index bd7cf5fbb..430419712 100644 --- a/test/5.8-cancel.sh +++ b/test/5.8-cancel.sh @@ -2,7 +2,7 @@ # # 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 @@ -12,7 +12,7 @@ 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 diff --git a/test/5.9-lpinfo.sh b/test/5.9-lpinfo.sh index 7d67fe3e0..5c76f220c 100644 --- a/test/5.9-lpinfo.sh +++ b/test/5.9-lpinfo.sh @@ -2,7 +2,7 @@ # # 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 diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index a4d642dae..64322d68c 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -737,19 +737,19 @@ echo " $date by $user on `hostname`." >>$strfile echo "
" >>$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
@@ -831,7 +831,7 @@ echo "`date '+[%d/%b/%Y:%H:%M:%S %z]'` \"5.11-history\":" >>$strfile
 
 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
diff --git a/test/waitjobs.sh b/test/waitjobs.sh
index 6e20e3caf..79c1ab057 100755
--- a/test/waitjobs.sh
+++ b/test/waitjobs.sh
@@ -2,7 +2,7 @@
 #
 # 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.
-- 
2.39.2