+++ /dev/null
-#!/bin/sh
-#
-# Script that builds the print-job tests for all IPP Everywhere PWG Raster
-# documents.
-#
-
-for file in color.jpg-4x6 document-a4 document-letter gray.jpg-4x6 onepage-a4 onepage-letter; do
- for res in 150dpi 180dpi 300dpi 360dpi 600dpi 720dpi; do
- HAVE_RES="`echo HAVE_$res | awk '{print toupper($1);}'`"
- for type in black-1 cmyk-8 sgray-8 srgb-8 srgb-16; do
- if test -f pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg; then
- HAVE_TYPE="`echo HAVE_$type | awk '{print toupper($1);}' | tr '-' '_'`"
- cat <<EOF
-{
- NAME "Print $file @ $res, $type"
- SKIP-IF-MISSING pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg
- SKIP-IF-NOT-DEFINED $HAVE_RES
- SKIP-IF-NOT-DEFINED $HAVE_TYPE
-
- OPERATION Print-Job
- GROUP operation-attributes-tag
- ATTR charset attributes-charset utf-8
- ATTR naturalLanguage attributes-natural-language en
- ATTR uri printer-uri \$uri
- ATTR name requesting-user-name \$user
- ATTR mimeMediaType document-format image/pwg-raster
- ATTR name job-name "$file"
- FILE pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg
-
- STATUS successful-ok
- STATUS server-error-busy REPEAT-MATCH
-}
-
-{
- NAME "Print $file @ $res, $type, deflate"
- SKIP-IF-MISSING pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg
- SKIP-IF-NOT-DEFINED $HAVE_RES
- SKIP-IF-NOT-DEFINED $HAVE_TYPE
- SKIP-IF-NOT-DEFINED HAVE_DEFLATE
-
- OPERATION Print-Job
- GROUP operation-attributes-tag
- ATTR charset attributes-charset utf-8
- ATTR naturalLanguage attributes-natural-language en
- ATTR uri printer-uri \$uri
- ATTR name requesting-user-name \$user
- ATTR mimeMediaType document-format image/pwg-raster
- ATTR keyword compression deflate
- ATTR name job-name "$file"
- COMPRESSION deflate
- FILE pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg
-
- STATUS successful-ok
- STATUS server-error-busy REPEAT-MATCH
-}
-
-{
- NAME "Print $file @ $res, $type, gzip"
- SKIP-IF-MISSING pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg
- SKIP-IF-NOT-DEFINED $HAVE_RES
- SKIP-IF-NOT-DEFINED $HAVE_TYPE
- SKIP-IF-NOT-DEFINED HAVE_GZIP
-
- OPERATION Print-Job
- GROUP operation-attributes-tag
- ATTR charset attributes-charset utf-8
- ATTR naturalLanguage attributes-natural-language en
- ATTR uri printer-uri \$uri
- ATTR name requesting-user-name \$user
- ATTR mimeMediaType document-format image/pwg-raster
- ATTR keyword compression gzip
- ATTR name job-name "$file"
- COMPRESSION gzip
- FILE pwg-raster-samples-$res-20111130/$type/$file-$type-$res.pwg
-
- STATUS successful-ok
- STATUS server-error-busy REPEAT-MATCH
-}
-
-EOF
- fi
- done
- done
-done
# 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.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
encryption=""
fi
+if test $testtype = 0; then
+ jobhistory="30m"
+ jobfiles="5m"
+else
+ jobhistory="30"
+ jobfiles="Off"
+fi
+
cat >$BASE/cupsd.conf <<EOF
StrictConformance Yes
Browsing Off
AccessLogLevel actions
LogLevel $loglevel
LogTimeFormat usecs
-PreserveJobHistory Yes
-PreserveJobFiles 5m
+PreserveJobHistory $jobhistory
+PreserveJobFiles $jobfiles
<Policy default>
<Limit All>
Order Allow,Deny
echo PASS
fi
-echo " </pre>" >>$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 " </pre>" >>$strfile
+
kill $cupsd
wait $cupsd
cupsdstatus=$?