From: Michael R Sweet Date: Mon, 11 Mar 2019 16:06:05 +0000 (-0400) Subject: Mirror test suite changes from master. X-Git-Tag: v2.2.11~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=488ec102c1e323301d15a49c7f18e8ca1cffc114;p=thirdparty%2Fcups.git Mirror test suite changes from master. --- diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index fc7e2525cc..e3fe7e9eb4 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -3,7 +3,7 @@ # Perform the complete set of IPP compliance tests specified in the # CUPS Software Test Plan. # -# Copyright © 2007-2018 by Apple Inc. +# Copyright © 2007-2019 by Apple Inc. # Copyright © 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -482,6 +482,14 @@ else encryption="" fi +if test $testtype = 0; then + jobhistory="30m" + jobfiles="5m" +else + jobhistory="30" + jobfiles="Off" +fi + cat >$BASE/cupsd.conf < Order Allow,Deny @@ -820,12 +828,70 @@ else echo PASS fi -echo " " >>$strfile + +# +# Perform job history test... +# + +echo $ac_n "Starting history test: $ac_c" +echo "" >>$strfile +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 +if test $? != 0; then + echo "FAIL (unable to queue test job)" + echo " FAILED" >>$strfile + fail=`expr $fail + 1` +else + echo "PASS" + echo " PASSED" >>$strfile + + ./waitjobs.sh >>$strfile + + echo $ac_n "Verifying that history still exists: $ac_c" + + echo " ls -l $BASE/spool" >>$strfile + count=`ls -1 $BASE/spool | wc -l` + if test $count = 1; then + echo "FAIL" + echo " FAILED (job control files not present)" >>$strfile + ls -l $BASE/spool >>$strfile + fail=`expr $fail + 1` + else + echo "PASS" + echo " PASSED" >>$strfile + + echo $ac_n "Waiting for job history to expire: $ac_c" + echo "" >>$strfile + echo " sleep 35" >>$strfile + sleep 35 + + echo " lpstat" >>$strfile + $runcups ../systemv/lpstat 2>&1 >>$strfile + + echo " ls -l $BASE/spool" >>$strfile + count=`ls -1 $BASE/spool | wc -l` + if test $count != 1; then + echo "FAIL" + echo " FAILED (job control files still present)" >>$strfile + ls -l $BASE/spool >>$strfile + fail=`expr $fail + 1` + else + echo "PASS" + echo " PASSED" >>$strfile + fi + fi +fi + # # Stop the server... # +echo " " >>$strfile + kill $cupsd wait $cupsd cupsdstatus=$?