]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix "make check" on Linux (<rdar://problem/14292998>)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 6 Nov 2013 20:11:11 +0000 (20:11 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 6 Nov 2013 20:11:11 +0000 (20:11 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11398 a1ca3aef-8c08-0410-bb20-df032aa958be

20 files changed:
test/4.1-requests.test
test/4.2-cups-printer-ops.test
test/4.3-job-ops.test
test/4.4-subscription-ops.test
test/5.1-lpadmin.sh
test/5.2-lpc.sh
test/5.3-lpq.sh
test/5.4-lpstat.sh
test/5.5-lp.sh
test/5.6-lpr.sh
test/5.7-lprm.sh
test/5.8-cancel.sh
test/5.9-lpinfo.sh
test/get-jobs.test
test/onepage-a4-300-black-1.pwg.gz [new file with mode: 0644]
test/onepage-letter-300-black-1.pwg.gz [new file with mode: 0644]
test/run-stp-tests.sh
test/test.convs [new file with mode: 0644]
test/testhp.ppd
test/testps.ppd

index fbd2a97f500b97adfa53a71117550a5454ba34c8..097d0fcd849a41df9a14c5b4765f4ba26a9482ee 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.1-requests.test 8144 2008-11-19 19:23:12Z mike $"
+# "$Id$"
 #
 #   Verify that the server requires the following attributes:
 #
        STATUS server-error-version-not-supported
 }
 #
-# End of "$Id: 4.1-requests.test 8144 2008-11-19 19:23:12Z mike $"
+# End of "$Id$"
 #
index 67c515dfe9132383fecdcffb64b3a5ec9601f943..022335758c04390312dd0a78c8ba1efcaa07ba4d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.2-cups-printer-ops.test 6379 2007-03-21 14:57:22Z mike $"
+# "$Id$"
 #
 #   Verify that the CUPS printer operations work.
 #
 }
 
 #
-# End of "$Id: 4.2-cups-printer-ops.test 6379 2007-03-21 14:57:22Z mike $"
+# End of "$Id$"
 #
index 2f2236b0cc7db6061eb0c2d03f9ad50a31de8b56..1e372ccbc8bb1c1b7e16929d862e8a1931679727 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.3-job-ops.test 7550 2008-05-12 16:40:40Z mike $"
+# "$Id$"
 #
 #   Verify that the IPP job operations work.
 #
 }
 
 #
-# End of "$Id: 4.3-job-ops.test 7550 2008-05-12 16:40:40Z mike $"
+# End of "$Id$"
 #
index f6cf820f1a7b6b843d6e17d059d9841975401cce..57a767ac5ed55162822f5ddf2d0c058814b1328d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.4-subscription-ops.test 6635 2007-07-09 20:34:48Z mike $"
+# "$Id$"
 #
 #   Verify that the CUPS subscription operations work.
 #
 }
 
 #
-# End of "$Id: 4.4-subscription-ops.test 6635 2007-07-09 20:34:48Z mike $"
+# End of "$Id$"
 #
index 09af2f4f9938a48959e9f8ea8dab0e399b5c5200..8ec5efe74c61d4e86068f683d5e956e1057641fd 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.1-lpadmin.sh 7494 2008-04-25 18:36:46Z mike $"
+# "$Id$"
 #
 # Test the lpadmin command.
 #
@@ -68,5 +68,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.1-lpadmin.sh 7494 2008-04-25 18:36:46Z mike $".
+# End of "$Id$".
 #
index ff15a8715192f77043f0a9f07027117d3056b642..f1957a8b2a898091b2dc2cf4b536f779dcdfb0a7 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.2-lpc.sh 6649 2007-07-11 21:46:42Z mike $"
+# "$Id$"
 #
 #   Test the lpc command.
 #
@@ -27,5 +27,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.2-lpc.sh 6649 2007-07-11 21:46:42Z mike $".
+# End of "$Id$".
 #
index 633508c5a77af0ce281606a4b7d4bb2b71c26c7a..03087d2ccf537d88e175856cee9eaea29efb8a4c 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.3-lpq.sh 6649 2007-07-11 21:46:42Z mike $"
+# "$Id$"
 #
 #   Test the lpq command.
 #
@@ -27,5 +27,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.3-lpq.sh 6649 2007-07-11 21:46:42Z mike $".
+# End of "$Id$".
 #
index b2e38f12e97b4d590575fbe02f82823e6c8992d7..c69003e42c46c583e4563dd5e3d67e2262087ff4 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.4-lpstat.sh 6649 2007-07-11 21:46:42Z mike $"
+# "$Id$"
 #
 #   Test the lpstat command.
 #
@@ -39,5 +39,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.4-lpstat.sh 6649 2007-07-11 21:46:42Z mike $".
+# End of "$Id$".
 #
index aa326a8fcb104334c633718a7ce8d642a590a446..949f3d770838cead7d89f06887578a32e6847cf0 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.5-lp.sh 7415 2008-03-31 22:33:20Z mike $"
+# "$Id$"
 #
 #   Test the lp command.
 #
@@ -80,5 +80,5 @@ echo ""
 ./waitjobs.sh
 
 #
-# End of "$Id: 5.5-lp.sh 7415 2008-03-31 22:33:20Z mike $".
+# End of "$Id$".
 #
index 9a26e75cb7c72697ac8d6c2afb0f8757260fc8e2..5d0663af3d10869d39cf3a265a90161fd4492b54 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.6-lpr.sh 7409 2008-03-29 00:26:03Z mike $"
+# "$Id$"
 #
 #   Test the lpr command.
 #
@@ -80,5 +80,5 @@ echo ""
 ./waitjobs.sh
 
 #
-# End of "$Id: 5.6-lpr.sh 7409 2008-03-29 00:26:03Z mike $".
+# End of "$Id$".
 #
index 4b96920bb2d816d06d0806eea72d27d77ef28997..482052d8631a7097bfad594a7982690c71ecc792 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.7-lprm.sh 7409 2008-03-29 00:26:03Z mike $"
+# "$Id$"
 #
 #   Test the lprm command.
 #
@@ -43,5 +43,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.7-lprm.sh 7409 2008-03-29 00:26:03Z mike $".
+# End of "$Id$".
 #
index 9ecb3f3a066f8f56f6940cb1e75ef0b6a587be54..11f599cd37fa0afcbd92fde4e066731bf88f7ffe 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.8-cancel.sh 7409 2008-03-29 00:26:03Z mike $"
+# "$Id$"
 #
 #   Test the cancel command.
 #
@@ -53,5 +53,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.8-cancel.sh 7409 2008-03-29 00:26:03Z mike $".
+# End of "$Id$".
 #
index a6ea3645e266e47a85faa67f568d7a7a8df9fb2c..adb041b0ad6a122acd732294f9ce9a2a6e35c65c 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: 5.9-lpinfo.sh 7711 2008-07-02 04:39:27Z mike $"
+# "$Id$"
 #
 #   Test the lpinfo command.
 #
@@ -51,5 +51,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.9-lpinfo.sh 7711 2008-07-02 04:39:27Z mike $".
+# End of "$Id$".
 #
index 13b9959c25e398b1237d531d0c3c35832ebb05b7..d4c3a0a8003d590ffd9ef69bfcdc87d41856b907 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: get-jobs.test 9702 2011-04-20 21:16:08Z mike $"
+# "$Id$"
 #
 #   Get list of not-completed jobs.
 #
@@ -49,5 +49,5 @@
 
 
 #
-# End of "$Id: get-jobs.test 9702 2011-04-20 21:16:08Z mike $".
+# End of "$Id$".
 #
diff --git a/test/onepage-a4-300-black-1.pwg.gz b/test/onepage-a4-300-black-1.pwg.gz
new file mode 100644 (file)
index 0000000..0a559fc
Binary files /dev/null and b/test/onepage-a4-300-black-1.pwg.gz differ
diff --git a/test/onepage-letter-300-black-1.pwg.gz b/test/onepage-letter-300-black-1.pwg.gz
new file mode 100644 (file)
index 0000000..8fd7386
Binary files /dev/null and b/test/onepage-letter-300-black-1.pwg.gz differ
index 7aaba742649752f48286fed90f89fefcc1a0880e..6779b875c000faf008daa2297ad6f4f29fada9f2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: run-stp-tests.sh 9034 2010-03-09 07:03:06Z mike $"
+# "$Id$"
 #
 #   Perform the complete set of IPP compliance tests specified in the
 #   CUPS Software Test Plan.
@@ -346,38 +346,97 @@ ln -s $root/templates /tmp/cups-$user/share
 # Local filters and configuration files...
 #
 
+instfilter() {
+       # instfilter src dst format
+       #
+       # See if the filter exists in a standard location; if so, make a
+       # symlink, otherwise create a dummy script for the specified format.
+       #
+       src="$1"
+       dst="$2"
+       format="$3"
+
+       for dir in /usr/libexec/cups/filter /usr/lib/cups/filter; do
+               if test -x "$dir/$src"; then
+                       ln -s "$dir/$src" "/tmp/cups-$user/bin/filter/$dst"
+                       return
+               fi
+       done
+
+       # Source filter not present, create a dummy filter
+       case $format in
+               passthru)
+                       ln -s gziptoany "/tmp/cups-$user/bin/filter/$dst"
+                       ;;
+               pdf)
+                       cat >"/tmp/cups-$user/bin/filter/$dst" <<EOF
+#!/bin/sh
+case "\$5" in
+       *media=a4* | *media=iso_a4* | *PageSize=A4*)
+               cat "$root/test/onepage-a4.pdf"
+               ;;
+       *)
+               cat "$root/test/onepage-letter.pdf"
+               ;;
+esac
+EOF
+                       chmod +x "/tmp/cups-$user/bin/filter/$dst"
+                       ;;
+               ps)
+                       cat >"/tmp/cups-$user/bin/filter/$dst" <<EOF
+#!/bin/sh
+case "\$5" in
+       *media=a4* | *media=iso_a4* | *PageSize=A4*)
+               cat "$root/test/onepage-a4.ps"
+               ;;
+       *)
+               cat "$root/test/onepage-letter.ps"
+               ;;
+esac
+EOF
+                       chmod +x "/tmp/cups-$user/bin/filter/$dst"
+                       ;;
+               raster)
+                       cat >"/tmp/cups-$user/bin/filter/$dst" <<EOF
+#!/bin/sh
+case "\$5" in
+       *media=a4* | *media=iso_a4* | *PageSize=A4*)
+               gunzip -c "$root/test/onepage-a4-300-black-1.pwg.gz"
+               ;;
+       *)
+               gunzip -c "$root/test/onepage-letter-300-black-1.pwg.gz"
+               ;;
+esac
+EOF
+                       chmod +x "/tmp/cups-$user/bin/filter/$dst"
+                       ;;
+       esac
+}
+ln -s $root/test/test.convs /tmp/cups-$user/share/mime
+
 if test `uname` = Darwin; then
-       ln -s /usr/libexec/cups/filter/cgpdfto* /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/cgbannertopdf /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/cgimagetopdf /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/cgtexttopdf /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/nsimagetopdf /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/nstexttopdf /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/pictwpstops /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/pstoappleps /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/pstocupsraster /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/pstopdffilter /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/rastertourf /tmp/cups-$user/bin/filter
-       ln -s /usr/libexec/cups/filter/xhtmltopdf /tmp/cups-$user/bin/filter
-
-       if test -f /private/etc/cups/apple.types; then
-               ln -s /private/etc/cups/apple.* /tmp/cups-$user/share/mime
-       elif test -f /usr/share/cups/mime/apple.types; then
-               ln -s /usr/share/cups/mime/apple.* /tmp/cups-$user/share/mime
-       fi
+       instfilter cgbannertopdf bannertopdf pdf
+       instfilter cgimagetopdf imagetopdf pdf
+       instfilter cgpdftopdf pdftopdf passthru
+       instfilter cgpdftops pdftops ps
+       instfilter cgpdftoraster pdftoraster raster
+       instfilter cgtexttopdf texttopdf pdf
+       instfilter pstocupsraster pstoraster raster
+       instfilter pstopdffilter pstopdf pdf
 else
-       ln -s /usr/lib/cups/filter/bannertops /tmp/cups-$user/bin/filter
-       ln -s /usr/lib/cups/filter/imagetops /tmp/cups-$user/bin/filter
-       ln -s /usr/lib/cups/filter/imagetoraster /tmp/cups-$user/bin/filter
-       ln -s /usr/lib/cups/filter/pdftops /tmp/cups-$user/bin/filter
-       ln -s /usr/lib/cups/filter/texttops /tmp/cups-$user/bin/filter
-
-       ln -s /usr/share/cups/mime/legacy.convs /tmp/cups-$user/share/mime
-       ln -s /usr/share/cups/charsets /tmp/cups-$user/share
-       if test -f $root/data/psglyphs; then
-               ln -s /usr/share/cups/data/psglyphs $root/data
+       instfilter bannertopdf bannertopdf pdf
+       instfilter bannertops bannertops ps
+       instfilter imagetopdf imagetopdf pdf
+       instfilter pdftopdf pdftopdf passthru
+       instfilter pdftops pdftops ps
+       instfilter pdftoraster pdftoraster raster
+       instfilter pstoraster pstoraster raster
+       instfilter texttopdf texttopdf pdf
+
+       if test -d /usr/share/cups/charsets; then
+               ln -s /usr/share/cups/charsets /tmp/cups-$user/share
        fi
-       ln -s /usr/share/cups/fonts /tmp/cups-$user/share
 fi
 
 #
@@ -853,7 +912,7 @@ else
 fi
 
 # Warning log messages
-count=`$GREP '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^W ' /tmp/cups-$user/log/error_log | $GREP -v CreateProfile | wc -l | awk '{print $1}'`
 if test $count != 9; then
        echo "FAIL: $count warning messages, expected 9."
        $GREP '^W ' /tmp/cups-$user/log/error_log
@@ -960,5 +1019,5 @@ if test $fail != 0; then
 fi
 
 #
-# End of "$Id: run-stp-tests.sh 9034 2010-03-09 07:03:06Z mike $"
+# End of "$Id$"
 #
diff --git a/test/test.convs b/test/test.convs
new file mode 100644 (file)
index 0000000..94ce07a
--- /dev/null
@@ -0,0 +1,9 @@
+# Test file listing potential filters for conversions
+application/pdf application/vnd.cups-pdf 100 pdftopdf
+application/pdf application/postscript 100 pdftops
+application/pdf application/vnd.cups-raster 100 pdftoraster
+application/postscript application/vnd.cups-raster 100 pstoraster
+application/vnd.cups-banner application/pdf 100 bannertopdf
+image/jpeg application/pdf 100 imagetopdf
+text/plain application/pdf 100 texttopdf
+
index 6200c7abaceaf0d828fdaa2171fa32d65ae69ea7..d90dd587c91b602dc29e4e8cbdd48d8e8186cfd0 100644 (file)
@@ -1,32 +1,32 @@
 *PPD-Adobe: "4.3"
 *%
-*% "$Id: testhp.ppd 6649 2007-07-11 21:46:42Z mike $"
+*% "$Id$"
 *%
-*%   Test HP PPD file for CUPS.
+*% Test HP PPD file for CUPS.
 *%
-*%   Copyright 2007-2011 by Apple Inc.
-*%   Copyright 1997-2005 by Easy Software Products.
+*% Copyright 2007-2013 by Apple Inc.
+*% Copyright 1997-2005 by Easy Software Products.
 *%
-*%   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/".
+*% 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/".
 *%
 *FormatVersion:        "4.3"
-*FileVersion:  "1.1"
+*FileVersion:  "1.7"
 *LanguageVersion: English
 *LanguageEncoding: ISOLatin1
 *PCFileName:   "TESTHP.PPD"
 *Manufacturer: "ESP"
 *Product:      "(CUPS v1.5)"
-*cupsVersion:  1.1
+*cupsVersion:  1.7
 *cupsManualCopies: True
 *cupsFilter:   "application/vnd.cups-raster 50 rastertohp"
 *cupsFilter2:  "application/vnd.cups-raster application/vnd.hp-pcl 50 rastertohp"
 *ModelName:     "Test HP Printer"
 *ShortNickName: "Test HP Printer"
-*NickName:      "Test HP Printer CUPS v1.1"
+*NickName:      "Test HP Printer CUPS v1.7"
 *PSVersion:    "(3010.000) 550"
 *LanguageLevel:        "3"
 *ColorDevice:  True
 
 *OpenUI *Resolution/Output Resolution: PickOne
 *OrderDependency: 20 AnySetup *Resolution
-*DefaultResolution: 100dpi
-*Resolution 75dpi/75 DPI: "<</HWResolution[75 75]>>setpagedevice"
-*Resolution 100dpi/100 DPI: "<</HWResolution[100 100]>>setpagedevice"
+*DefaultResolution: 300dpi
+*Resolution 150dpi/150 DPI: "<</HWResolution[150 150]>>setpagedevice"
+*Resolution 300dpi/300 DPI: "<</HWResolution[300 300]>>setpagedevice"
+*Resolution 600dpi/600 DPI: "<</HWResolution[600 600]>>setpagedevice"
 *CloseUI: *Resolution
 
 *OpenUI *ColorModel/Output Mode: PickOne
 *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
 *Font ZapfDingbats: Special "(001.004S)" Standard ROM
 *%
-*% End of "$Id: testhp.ppd 6649 2007-07-11 21:46:42Z mike $".
+*% End of "$Id$".
 *%
index 10b4a377480aedd3fb8c1bee1a73010595f6652c..a200c4a5018bda4f4ee248e1eefc85232c7b4168 100644 (file)
@@ -1,6 +1,6 @@
 *PPD-Adobe: "4.3"
 *%
-*% "$Id: testps.ppd 6649 2007-07-11 21:46:42Z mike $"
+*% "$Id$"
 *%
 *%   Test PS PPD file for CUPS.
 *%
 *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
 *Font ZapfDingbats: Special "(001.004S)" Standard ROM
 *%
-*% End of "$Id: testps.ppd 6649 2007-07-11 21:46:42Z mike $".
+*% End of "$Id$".
 *%