From: msweet Date: Mon, 25 Aug 2014 21:38:31 +0000 (+0000) Subject: Save work on all of the IPP Everywhere tests, and a bug fix for ippfind. X-Git-Tag: v2.2b1~508 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8288bfd0d9e5bfef24627198282ab836e7fa82f2;p=thirdparty%2Fcups.git Save work on all of the IPP Everywhere tests, and a bug fix for ippfind. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12117 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/everywhere/bonjour-tests.sh b/everywhere/bonjour-tests.sh index e69de29bb2..91ce766c28 100755 --- a/everywhere/bonjour-tests.sh +++ b/everywhere/bonjour-tests.sh @@ -0,0 +1,338 @@ +#!/bin/sh +# +# "$Id$" +# +# IPP Everywhere Printer Self-Certification Manual 1.0: Section 7: Document Data Tests. +# +# Copyright 2014 by The Printer Working Group. +# +# This program may be copied and furnished to others, and derivative works +# that comment on, or otherwise explain it or assist in its implementation may +# be prepared, copied, published and distributed, in whole or in part, without +# restriction of any kind, provided that the above copyright notice and this +# paragraph are included on all such copies and derivative works. +# +# The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES, +# WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED +# WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# Usage: +# +# ./bonjour-tests.sh "Printer Name" +# + +if test -x ../test/ippfind-static; then + IPPFIND="../test/ippfind-static" +elif test -x ./ippfind; then + IPPFIND="./ippfind" +else + IPPFIND="ippfind" +fi + +if test -x ../test/ipptool-static; then + IPPTOOL="../test/ipptool-static" +elif test -x ./ipptool; then + IPPTOOL="./ipptool" +else + IPPTOOL="ipptool" +fi + +PLIST="$1 Bonjour Results.plist" + +# +# Figure out the proper echo options... +# + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + ac_n=-n + ac_c= +else + ac_n= + ac_c='\c' +fi + +# Special case "_failN" name to show bad/missing TXT keys +if test "$2" = _fail2 -o "$2" = _fail4 -o "$2" = _fail5.3 -o "$2" = _fail5.5; then + echo "FAIL" + echo "Errors" >>"$PLIST" + if test "${IPPFIND_TXT_ADMINURL:-NOTSET}" = NOTSET; then + echo " adminurl is not set." + echo "adminurl is not set." >>"$PLIST" + elif test "$2" = _fail4 -o "$2" = _fail5.5; then + case "$IPPFIND_TXT_ADMINURL" in + http://* | https://*) + ;; + *) + echo " adminurl has bad value '$IPPFIND_TXT_ADMINURL'." + echo "adminurl has bad value '$IPPFIND_TXT_ADMINURL'." >>"$PLIST" + ;; + esac + fi + + if test "${IPPFIND_TXT_PDL:-NOTSET}" = NOTSET; then + echo " pdl is not set." + echo "pdl is not set." >>"$PLIST" + elif test "$2" = _fail4 -o "$2" = _fail5.5; then + case "$IPPFIND_TXT_PDL" in + *image/jpeg*) + ;; + *) + echo " pdl is missing image/jpeg: '$IPPFIND_TXT_PDL'" + echo "pdl is missing image/jpeg: '$IPPFIND_TXT_PDL'." >>"$PLIST" + ;; + esac + + case "$IPPFIND_TXT_PDL" in + *image/pwg-raster*) + ;; + *) + echo " pdl is missing image/pwg-raster: '$IPPFIND_TXT_PDL'" + echo "pdl is missing image/pwg-raster: '$IPPFIND_TXT_PDL'." >>"$PLIST" + ;; + esac + fi + + if test "${IPPFIND_TXT_RP:-NOTSET}" = NOTSET; then + echo " rp is not set." + echo "rp is not set." >>"$PLIST" + elif test "$2" = _fail4 -o "$2" = _fail5.5; then + case "$IPPFIND_TXT_RP" in + ipp/print | ipp/print/*) + ;; + *) + echo " rp has bad value '$IPPFIND_TXT_RP'" + echo "rp has bad value '$IPPFIND_TXT_RP'." >>"$PLIST" + ;; + esac + fi + + if test "${IPPFIND_TXT_UUID:-NOTSET}" = NOTSET; then + echo " UUID is not set." + echo "UUID is not set." >>"$PLIST" + elif test "$2" = _fail4 -o "$2" = _fail5.5; then + case "$IPPFIND_TXT_UUID" in + [0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]) + ;; + *) + echo " UUID has bad value '$IPPFIND_TXT_UUID'" + echo "UUID has bad value '$IPPFIND_TXT_UUID'." >>"$PLIST" + ;; + esac + fi + + if test "$2" = _fail4 -o "$2" = _fail5.5; then + $IPPTOOL -t -d "ADMINURL=$IPPFIND_TXT_ADMINURL" -d "UUID=$IPPFIND_TXT_UUID" $IPPFIND_SERVICE_URI bonjour-tests.test + $IPPTOOL -t -d "ADMINURL=$IPPFIND_TXT_ADMINURL" -d "UUID=$IPPFIND_TXT_UUID" $IPPFIND_SERVICE_URI bonjour-tests.test | egrep '(GOT|EXPECTED):' | sed -e '1,$s/^[ ]*//' | awk '{print "" $0 "" }' >>"$PLIST" + fi + + echo "" >>"$PLIST" + echo "Successful" >>"$PLIST" + echo "" >>"$PLIST" + + exit 0 +fi + + +# Write the standard XML plist header... +cat >"$PLIST" < + + + +FileIdorg.pwg.ipp-everywhere.bonjour-20140825 +Tests +EOF + +total=0 +pass=0 +fail=0 +skip=0 + +# start_test "name" +start_test() { + total=`expr $total + 1` + echo $ac_n "$1: $ac_c" + echo "Name$1" >>"$PLIST" +} +# end_test PASS/FAIL/SKIP +end_test() { + echo $1 + if test $1 = FAIL; then + echo "Successful" >>"$PLIST" + else + echo "Successful" >>"$PLIST" + fi + echo "" >>"$PLIST" +} + +# B-1. IPP Browse test: Printers appear in a search for "_ipp._tcp,_print" services? +start_test "B-1. IPP Browse test" +$IPPFIND _ipp._tcp,_print.local. --name "$1" --quiet +if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS +else + fail=`expr $fail + 1` + end_test FAIL +fi + +# B-2. IPP TXT keys test: The IPP TXT record contains all required keys. +start_test "B-2. IPP TXT keys test" +$IPPFIND "$1._ipp._tcp.local." --txt adminurl --txt pdl --txt rp --txt UUID --quiet +if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS +else + fail=`expr $fail + 1` + $IPPFIND "$1._ipp._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail2 \; +fi + +# B-3. IPP Resolve test: Printer responds to an IPP Get-Printer-Attributes request using the resolved hostname, port, and resource path. +start_test "B-3. IPP Resolve test" +$IPPFIND "$1._ipp._tcp.local." --ls >/dev/null +if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS +else + fail=`expr $fail + 1` + echo "Errors" >>"$PLIST" + $IPPFIND "$1._ipp._tcp.local." --ls | awk '{ print "" $0 "" }' >>"$PLIST" + echo "" >>"$PLIST" + end_test FAIL +fi + +# B-4. IPP TXT values test: The IPP TXT record values match the reported IPP attribute values. +start_test "B-4. IPP TXT values test" +$IPPFIND "$1._ipp._tcp.local." --txt-adminurl '^(http:|https:)//' --txt-pdl 'image/pwg-raster' --txt-pdl 'image/jpeg' --txt-rp '^ipp/(print|print/[^/]+)$' --txt-UUID '^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$' -x $IPPTOOL -q -d 'ADMINURL={txt_adminurl}' -d 'UUID={txt_uuid}' '{}' bonjour-tests.test \; +if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS +else + fail=`expr $fail + 1` + $IPPFIND "$1._ipp._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail4 \; +fi + +# B-5. TLS tests: Performed only if TLS is supported +start_test "B-5. TLS tests" +$IPPFIND "$1._ipp._tcp.local." --txt tls --quiet +if test $? = 0; then + pass=`expr $pass + 1` + HAVE_TLS=1 + end_test PASS +else + skip=`expr $skip + 1` + HAVE_TLS=0 + end_test SKIP +fi + +# B-5.1 HTTP Upgrade test: Printer responds to an IPP Get-Printer-Attributes request after doing an HTTP Upgrade to TLS. +start_test "B-5.1 HTTP Upgrade test" +if test $HAVE_TLS = 1; then + $IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -E -q -d NO_VALUE_TESTS '{}' bonjour-tests.test \; + if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS + else + fail=`expr $fail + 1` + end_test FAIL + fi +else + skip=`expr $skip + 1` + end_test SKIP +fi + +# B-5.2 IPPS Browse test: Printer appears in a search for "_ipps._tcp,_print" services. +start_test "B-5.2 IPPS Browse test" +if test $HAVE_TLS = 1; then + $IPPFIND _ipps._tcp,_print.local. --name "$1" --quiet + if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS + else + fail=`expr $fail + 1` + end_test FAIL + fi +else + skip=`expr $skip + 1` + end_test SKIP +fi + +# B-5.3 IPPS TXT keys test: The TXT record for IPPS contains all required keys +start_test "B-5.3 IPPS TXT keys test" +if test $HAVE_TLS = 1; then + $IPPFIND "$1._ipps._tcp.local." --txt adminurl --txt pdl --txt rp --txt TLS --txt UUID --quiet + if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS + else + fail=`expr $fail + 1` + $IPPFIND "$1._ipps._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail5.3 \; + fi +else + skip=`expr $skip + 1` + end_test SKIP +fi + +# B-5.4 IPPS Resolve test: Printer responds to an IPPS Get-Printer-Attributes request using the resolved hostname, port, and resource path. +start_test "B-5.4 IPPS Resolve test" +if test $HAVE_TLS = 1; then + $IPPFIND "$1._ipps._tcp.local." --ls >/dev/null + if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS + else + fail=`expr $fail + 1` + echo "Errors" >>"$PLIST" + $IPPFIND "$1._ipps._tcp.local." --ls | awk '{ print "" $0 "" }' >>"$PLIST" + echo "" >>"$PLIST" + end_test FAIL + fi +else + skip=`expr $skip + 1` + end_test SKIP +fi + +# B-5.5 IPPS TXT values test: The TXT record values for IPPS match the reported IPPS attribute values. +start_test "B-5.5 IPPS TXT values test" +if test $HAVE_TLS = 1; then + $IPPFIND "$1._ipps._tcp.local." --txt-adminurl '^(http:|https:)//' --txt-pdl 'image/pwg-raster' --txt-pdl 'image/jpeg' --txt-rp '^ipp/(print|print/[^/]+)$' --txt-UUID '^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$' -x $IPPTOOL -q -d 'ADMINURL={txt_adminurl}' -d 'UUID={txt_uuid}' '{}' bonjour-tests.test \; + if test $? = 0; then + pass=`expr $pass + 1` + end_test PASS + else + fail=`expr $fail + 1` + $IPPFIND "$1._ipps._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail5.5 \; + fi +else + skip=`expr $skip + 1` + end_test SKIP +fi + +# Finish up... +if test $fail -gt 0; then + cat >>"$PLIST" < +Successful + +EOF +else + cat >>"$PLIST" < +Successful + +EOF +fi + +cat >>"$PLIST" < + +EOF + +score=`expr $pass + $skip` +score=`expr 100 \* $score / $total` +echo "Summary: $total tests, $pass passed, $fail failed, $skip skipped" +echo "Score: ${score}%" + +# +# End of "$Id$". +# diff --git a/everywhere/bonjour-tests.test b/everywhere/bonjour-tests.test new file mode 100644 index 0000000000..1ac8448e18 --- /dev/null +++ b/everywhere/bonjour-tests.test @@ -0,0 +1,67 @@ +# +# "$Id$" +# +# IPP Everywhere Printer Self-Certification Manual 1.0: Section 5: Bonjour Tests. +# +# Copyright 2014 by The Printer Working Group. +# Copyright 2007-2013 by Apple Inc. +# Copyright 2001-2006 by Easy Software Products. All rights reserved. +# +# These coded instructions, statements, and computer programs are the +# property of Apple Inc. and are protected by Federal copyright +# law. Distribution and use rights are outlined in the file "LICENSE.txt" +# which should have been included with this file. If this file is +# file is missing or damaged, see the license at "http://www.cups.org/". +# +# Usage: +# +# ./ipptool -tI printer-uri -d ADMINURL=url -d UUID=uuid bonjour-tests.test +# + +FILE-ID "org.pwg.ipp-everywhere.bonjour-20140825" + +{ + SKIP-IF-DEFINED NO_VALUE_TESTS + + # The name of the test... + NAME "Validate TXT record values using Get-Printer-Attributes" + + # The operation to use + OPERATION Get-Printer-Attributes + + # Attributes, starting in the operation group... + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR language attributes-natural-language en + ATTR uri printer-uri $uri + + # What statuses are OK? + STATUS successful-ok + + # What attributes do we expect? + EXPECT printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$ADMINURL" + EXPECT printer-uuid OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "urn:uuid:$UUID" +} + +{ + SKIP-IF-NOT-DEFINED NO_VALUE_TESTS + + # The name of the test... + NAME "Validate Get-Printer-Attributes after HTTP Upgrade" + + # The operation to use + OPERATION Get-Printer-Attributes + + # Attributes, starting in the operation group... + GROUP operation-attributes-tag + ATTR charset attributes-charset utf-8 + ATTR language attributes-natural-language en + ATTR uri printer-uri $uri + + # What statuses are OK? + STATUS successful-ok +} + +# +# End of "$Id$". +# diff --git a/everywhere/document-format-tests.sh b/everywhere/document-format-tests.sh index 8e900e35e5..e6a37e32f4 100755 --- a/everywhere/document-format-tests.sh +++ b/everywhere/document-format-tests.sh @@ -21,7 +21,23 @@ # ./document-format-tests.sh "Printer Name" # -ippfind "$1._ipp._tcp.local." -x ipptool -P "$1 Document Format Results.plist" -I '{}' document-format-tests.test \; +if test -x ../test/ippfind-static; then + IPPFIND="../test/ippfind-static" +elif test -x ./ippfind; then + IPPFIND="./ippfind" +else + IPPFIND="ippfind" +fi + +if test -x ../test/ipptool-static; then + IPPTOOL="../test/ipptool-static" +elif test -x ./ipptool; then + IPPTOOL="./ipptool" +else + IPPTOOL="ipptool" +fi + +$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -P "$1 Document Format Results.plist" -I '{}' document-format-tests.test \; # # End of "$Id$". diff --git a/everywhere/document-format-tests.test b/everywhere/document-format-tests.test index fdf859d9d5..6a3652d9d7 100644 --- a/everywhere/document-format-tests.test +++ b/everywhere/document-format-tests.test @@ -27,8 +27,10 @@ # data is available in the "everywhere" subdirectory of the CUPS source code. # +FILE-ID "org.pwg.ipp-everywhere.document-format-20140825" + { - NAME "1. PWG Raster Format Tests (mandatory)" + NAME "D-1. PWG Raster Format Tests (mandatory)" OPERATION Get-Printer-Attributes GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -54,7 +56,7 @@ #### 1.1 NO COMPRESSION #### { SKIP-IF-NOT-DEFINED HAVE_BLACK - NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1" + NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -69,7 +71,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_SGRAY - NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8" + NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -84,7 +86,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_SRGB - NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8" + NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -99,7 +101,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_CMYK - NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8" + NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -117,7 +119,7 @@ { SKIP-IF-NOT-DEFINED HAVE_BLACK SKIP-IF-NOT-DEFINED HAVE_DEFLATE - NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, deflate" + NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, deflate" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -135,7 +137,7 @@ { SKIP-IF-NOT-DEFINED HAVE_SGRAY SKIP-IF-NOT-DEFINED HAVE_DEFLATE - NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, deflate" + NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, deflate" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -153,7 +155,7 @@ { SKIP-IF-NOT-DEFINED HAVE_SRGB SKIP-IF-NOT-DEFINED HAVE_DEFLATE - NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, deflate" + NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, deflate" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -171,7 +173,7 @@ { SKIP-IF-NOT-DEFINED HAVE_CMYK SKIP-IF-NOT-DEFINED HAVE_DEFLATE - NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, deflate" + NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, deflate" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -191,7 +193,7 @@ { SKIP-IF-NOT-DEFINED HAVE_BLACK SKIP-IF-NOT-DEFINED HAVE_GZIP - NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, gzip" + NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, gzip" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -209,7 +211,7 @@ { SKIP-IF-NOT-DEFINED HAVE_SGRAY SKIP-IF-NOT-DEFINED HAVE_GZIP - NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, gzip" + NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, gzip" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -227,7 +229,7 @@ { SKIP-IF-NOT-DEFINED HAVE_SRGB SKIP-IF-NOT-DEFINED HAVE_GZIP - NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, gzip" + NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, gzip" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -245,7 +247,7 @@ { SKIP-IF-NOT-DEFINED HAVE_CMYK SKIP-IF-NOT-DEFINED HAVE_GZIP - NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, gzip" + NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, gzip" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -264,7 +266,7 @@ #### 1.4 A4 TESTS #### { SKIP-IF-NOT-DEFINED HAVE_BLACK - NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, black-1" + NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, black-1" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -279,7 +281,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_SGRAY - NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, sgray-8" + NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, sgray-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -294,7 +296,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_SRGB - NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, srgb-8" + NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, srgb-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -309,7 +311,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_CMYK - NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, cmyk-8" + NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, cmyk-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -326,7 +328,7 @@ #### 1.5 US Letter TESTS #### { SKIP-IF-NOT-DEFINED HAVE_BLACK - NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, black-1" + NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, black-1" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -341,7 +343,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_SGRAY - NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, sgray-8" + NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, sgray-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -356,7 +358,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_SRGB - NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, srgb-8" + NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, srgb-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -371,7 +373,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_CMYK - NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, cmyk-8" + NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, cmyk-8" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -387,7 +389,7 @@ #### JPEG Tests { - NAME "2. JPEG Tests (mandatory)" + NAME "D-2. JPEG Tests (mandatory)" OPERATION Get-Printer-Attributes GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -400,7 +402,7 @@ EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/jpeg" } { - NAME "2.1 Print color.jpg with defaults" + NAME "D-2.1 Print color.jpg with defaults" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -415,7 +417,7 @@ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30 } { - NAME "2.2 Print color.jpg with copies=2" + NAME "D-2.2 Print color.jpg with copies=2" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -432,7 +434,7 @@ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30 } { - NAME "2.3 Print color.jpg with print-color-mode=monochrome" + NAME "D-2.3 Print color.jpg with print-color-mode=monochrome" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -449,7 +451,7 @@ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30 } { - NAME "2.4 Print color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true" + NAME "D-2.4 Print color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -467,7 +469,7 @@ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30 } { - NAME "2.5 Print color.jpg with media=iso_a4_210x297mm and ipp-attribute-fidelity=true" + NAME "D-2.5 Print color.jpg with media=iso_a4_210x297mm and ipp-attribute-fidelity=true" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -487,7 +489,7 @@ #### PDF Tests { - NAME "3. PDF Tests (if PDF is supported)" + NAME "D-3. PDF Tests (if PDF is supported)" OPERATION Get-Printer-Attributes GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -502,7 +504,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_PDF - NAME "3.1 Print document-letter.pdf with defaults" + NAME "D-3.1 Print document-letter.pdf with defaults" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -518,7 +520,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_PDF - NAME "3.2 Print document-letter.pdf with copies=2" + NAME "D-3.2 Print document-letter.pdf with copies=2" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -536,7 +538,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_PDF - NAME "3.3 Print document-letter.pdf with page-ranges=3-3 and print-color-mode=monochrome" + NAME "D-3.3 Print document-letter.pdf with page-ranges=3-3 and print-color-mode=monochrome" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -556,7 +558,7 @@ { SKIP-IF-NOT-DEFINED HAVE_PDF SKIP-IF-NOT-DEFINED HAVE_DUPLEX - NAME "3.4 Print document-letter.pdf with sides=two-sided-long-edge" + NAME "D-3.4 Print document-letter.pdf with sides=two-sided-long-edge" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -574,7 +576,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_PDF - NAME "3.5 Print document-letter.pdf with media=iso_a4_210x297mm and ipp-attribute-fidelity=true" + NAME "D-3.5 Print document-letter.pdf with media=iso_a4_210x297mm and ipp-attribute-fidelity=true" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 @@ -593,7 +595,7 @@ } { SKIP-IF-NOT-DEFINED HAVE_PDF - NAME "3.6 Print document-a4.pdf with media=na_letter_8.5x11in and ipp-attribute-fidelity=true" + NAME "D-3.6 Print document-a4.pdf with media=na_letter_8.5x11in and ipp-attribute-fidelity=true" OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 diff --git a/everywhere/ipp-tests.sh b/everywhere/ipp-tests.sh index 33eaffa297..eb2106e7d8 100755 --- a/everywhere/ipp-tests.sh +++ b/everywhere/ipp-tests.sh @@ -21,7 +21,23 @@ # ./ipp-tests.sh "Printer Name" # -ippfind "$1._ipp._tcp.local." -x ipptool -P "$1 IPP Results.plist" -I '{}' ipp-tests.test \; +if test -x ../test/ippfind-static; then + IPPFIND="../test/ippfind-static" +elif test -x ./ippfind; then + IPPFIND="./ippfind" +else + IPPFIND="ippfind" +fi + +if test -x ../test/ipptool-static; then + IPPTOOL="../test/ipptool-static" +elif test -x ./ipptool; then + IPPTOOL="./ipptool" +else + IPPTOOL="ipptool" +fi + +$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -P "$1 IPP Results.plist" -I '{}' ipp-tests.test \; # # End of "$Id$". diff --git a/everywhere/ipp-tests.test b/everywhere/ipp-tests.test index 99e50573a6..8eec5de9a8 100644 --- a/everywhere/ipp-tests.test +++ b/everywhere/ipp-tests.test @@ -26,6 +26,8 @@ # 'media-needed' keywords in the "printer-state-reasons" Printer attribute. # +FILE-ID "org.pwg.ipp-everywhere.ipp-20140825" + # All tests use IPP version 2.0, unless overridden in a test... VERSION 2.0 diff --git a/test/ippfind.c b/test/ippfind.c index 5485c9f8ba..9c5cfc6894 100644 --- a/test/ippfind.c +++ b/test/ippfind.c @@ -242,7 +242,7 @@ main(int argc, /* I - Number of command-line args */ { int i, /* Looping var */ have_output = 0,/* Have output expression */ - status = IPPFIND_EXIT_TRUE; + status = IPPFIND_EXIT_FALSE; /* Exit status */ const char *opt, /* Option character */ *search; /* Current browse/resolve string */ @@ -1420,8 +1420,8 @@ main(int argc, /* I - Number of command-line args */ service->ref = NULL; } - if (!eval_expr(service, expressions)) - status = IPPFIND_EXIT_FALSE; + if (eval_expr(service, expressions)) + status = IPPFIND_EXIT_TRUE; service->is_processed = 1; }