summaryrefslogtreecommitdiff
path: root/src/cups/test-ppds
diff options
context:
space:
mode:
Diffstat (limited to 'src/cups/test-ppds')
-rwxr-xr-xsrc/cups/test-ppds21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/cups/test-ppds b/src/cups/test-ppds
index a5fa5a7..4e60d2b 100755
--- a/src/cups/test-ppds
+++ b/src/cups/test-ppds
@@ -1,15 +1,18 @@
#!/bin/sh
-if [ "$#" = 0 ] ; then
- echo "Bypassing test-ppds for now due to bugs in cupstestppd!"
- exit 0
- rm -rf ppd ppd-stamp
- make ppd
-fi
+make ppd-clean ppd-global ppd-nls ppd-nonls
+
+# Most non-Macintosh systems won't have the Macintosh-specific profiles
+# installed in Macintosh-specific locations.
+#
+# Also, a number of our media sizes aren't named correctly, but we'll
+# accept those issues rather than cluttering the namespace further and/or
+# changing tag names.
+cupstestppdopts='-I profiles -W sizes'
ppd_count=`find ppd \( -name '*.ppd.gz' -o -name '*.ppd' \) -print | wc -l`
-failures="`find ppd -name '*.ppd*' -print | xargs cupstestppd |grep 'FAIL$' | awk -F: '{print $1}'`"
+failures="`find ppd -name '*.ppd*' -print | xargs cupstestppd $cupstestppdopts |grep 'FAIL$' | awk -F: '{print $1}'`"
if [ -z "$failures" ] ; then
echo "All $ppd_count PPD files pass"
@@ -17,12 +20,12 @@ if [ -z "$failures" ] ; then
fi
# Use this with "normal" PPD files without translated numbers.
-echo $failures | xargs cupstestppd 2>&1 | egrep -v 'Missing "[a-z][a-z](_[A-Z][A-Z])?" translation string for option Stp((Brightness|Contrast|Saturation), choice None|([a-zA-Z0-9]+, choice (-?[0-9]+)))!$' |egrep -v 'Missing cupsICCProfile file'
+#echo $failures | xargs cupstestppd $cupstestppdopts 2>&1 | egrep -v 'Missing "[a-z][a-z](_[A-Z][A-Z])?" translation string for option Stp((Brightness|Contrast|Saturation), choice None|([a-zA-Z0-9]+, choice (-?[0-9]+)))!$' |egrep -v 'Missing cupsICCProfile file'
# Use this with PPD files with translated numbers (genppd -N)
# With normal globalized PPD files this will yield hundreds of megabytes
# of errors.
-#echo $failures | xargs cupstestppd 2>&1 |egrep -v 'Missing cupsICCProfile file'
+echo $failures | xargs cupstestppd $cupstestppdopts 2>&1 |egrep -v 'Missing cupsICCProfile file'
fail_count=`echo "$failures" | wc -l`
echo "$fail_count/$ppd_count fail"