]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix "make check":
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 4 Feb 2013 16:47:11 +0000 (16:47 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 4 Feb 2013 16:47:11 +0000 (16:47 +0000)
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

systemv/cancel.c
test/5.8-cancel.sh
test/ipp-1.1.test
test/run-stp-tests.sh

index 79c3001c4b4c377c510e72ea7d835d54dadefa4f..9ea549c93ba90070c9ddb4024d84fcc91d50419f 100644 (file)
@@ -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
     {
      /*
index 3b2379a416c608dba19a3bdda135da3c661b45f9..11f599cd37fa0afcbd92fde4e066731bf88f7ffe 100644 (file)
@@ -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$".
 #
index 5d67ff678f5571348004d9b7da0dd941388f2954..4fd0ad7e19dcf76260068c1eb223f54263dfcc19 100644 (file)
@@ -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
index 545953585c746dadd8fc3903640a9e86443afe89..29d3a2568eaf5a409b76697ac839949ee925e7cd 100755 (executable)
@@ -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
 <Policy default>
 <Limit All>
 Order Allow,Deny