From: mike Date: Mon, 4 Feb 2013 16:47:11 +0000 (+0000) Subject: Fix "make check": X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75cbf98889d7ddee9f06005bdc8d6c9629f82720;p=thirdparty%2Fcups.git Fix "make check": 1. cancel -a semantics changed, add a purge test. 2. cancel -a -x did not work; fixed. 3. IPP/1.1 tests referenced color.jpeg but the file is color.jpg. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10857 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/systemv/cancel.c b/systemv/cancel.c index 79c3001c4b..9ea549c93b 100644 --- a/systemv/cancel.c +++ b/systemv/cancel.c @@ -68,6 +68,7 @@ main(int argc, /* I - Number of command-line arguments */ for (i = 1; i < argc; i ++) if (argv[i][0] == '-' && argv[i][1]) + { switch (argv[i][1]) { case 'E' : /* Encrypt */ @@ -101,7 +102,7 @@ main(int argc, /* I - Number of command-line arguments */ break; case 'a' : /* Cancel all jobs */ - op = IPP_CANCEL_JOBS; + op = purge ? IPP_PURGE_JOBS : IPP_CANCEL_JOBS; break; case 'h' : /* Connect to host */ @@ -152,6 +153,9 @@ main(int argc, /* I - Number of command-line arguments */ case 'x' : /* Purge job(s) */ purge = 1; + + if (op == IPP_CANCEL_JOBS) + op = IPP_PURGE_JOBS; break; default : @@ -160,6 +164,7 @@ main(int argc, /* I - Number of command-line arguments */ argv[0], argv[i][1]); return (1); } + } else { /* diff --git a/test/5.8-cancel.sh b/test/5.8-cancel.sh index 3b2379a416..11f599cd37 100644 --- a/test/5.8-cancel.sh +++ b/test/5.8-cancel.sh @@ -4,7 +4,7 @@ # # Test the cancel command. # -# Copyright 2007-2011 by Apple Inc. +# Copyright 2007-2013 by Apple Inc. # Copyright 1997-2006 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -40,6 +40,18 @@ else fi echo "" +echo "Purge All Test" +echo "" +echo " cancel -a -x" +$VALGRIND ../systemv/cancel -a -x 2>&1 +if test $? != 0; then + echo " FAILED" + exit 1 +else + echo " PASSED" +fi +echo "" + # # End of "$Id$". # diff --git a/test/ipp-1.1.test b/test/ipp-1.1.test index 5d67ff678f..4fd0ad7e19 100644 --- a/test/ipp-1.1.test +++ b/test/ipp-1.1.test @@ -2124,7 +2124,7 @@ DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/" GROUP job-attributes-tag ATTR keyword media $OPTIONAL_4X6_MEDIA ATTR enum print-quality 3 - FILE color.jpeg + FILE color.jpg STATUS successful-ok STATUS server-error-job-canceled @@ -2162,7 +2162,7 @@ DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/" GROUP job-attributes-tag ATTR keyword media $OPTIONAL_4X6_MEDIA ATTR enum print-quality 4 - FILE color.jpeg + FILE color.jpg STATUS successful-ok STATUS server-error-job-canceled @@ -2200,7 +2200,7 @@ DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/" GROUP job-attributes-tag ATTR keyword media $OPTIONAL_4X6_MEDIA ATTR enum print-quality 5 - FILE color.jpeg + FILE color.jpg STATUS successful-ok STATUS server-error-job-canceled diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index 545953585c..29d3a2568e 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -5,7 +5,7 @@ # Perform the complete set of IPP compliance tests specified in the # CUPS Software Test Plan. # -# Copyright 2007-2012 by Apple Inc. +# Copyright 2007-2013 by Apple Inc. # Copyright 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -399,6 +399,7 @@ AccessLogLevel actions LogLevel debug2 LogTimeFormat usecs PreserveJobHistory Yes +PreserveJobFiles No Order Allow,Deny