]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Make some changes to allow the automated test suite to run in certain restricted
authorMichael R Sweet <msweet@msweet.org>
Sat, 14 Nov 2020 14:09:48 +0000 (09:09 -0500)
committerMichael R Sweet <msweet@msweet.org>
Sat, 14 Nov 2020 14:09:48 +0000 (09:09 -0500)
build/CI setups (Issue #25)

CHANGES-OPENPRINTING.md
cups/testi18n.c
cups/testppd.c
test/run-stp-tests.sh
test/test.convs

index 9876ea6536702d624def978e3ec892a298ef3752..a8743728ece33f50f6b4cea113e93d8f177ae176 100644 (file)
@@ -45,6 +45,8 @@ Changes in CUPS v2.3.3op1
 - Fixed output-bin and print-quality handling issues (Issue #18)
 - Fixed PPD options getting mapped to odd IPP values like "tray---4" (Issue #23)
 - Fixed remote access to the cupsd.conf and log files (Issue #24)
+- Fixed the automated test suite when running in certain build/CI environments
+  (Issue #25)
 - Fixed a logging regression caused by a previous change for Apple issue #5604
   (Issue #25)
 - Fixed fax phone number handling with GNOME (Issue #40)
index 45e1cab35d637195bbb03500a5225bcf9c5c42b5..4a67c93ba28aae01fff8def44962f600e68309bd 100644 (file)
@@ -410,7 +410,7 @@ main(int  argc,                             /* I - Argument Count */
       puts("PASS");
   }
 
-#ifndef __linux
+#if !defined(__linux__) && !defined(__GLIBC__)
   fputs("cupsCharsetToUTF8(CUPS_EUC_JP): ", stdout);
 
   strlcpy(legsrc, legdest, sizeof(legsrc));
@@ -432,7 +432,7 @@ main(int  argc,                             /* I - Argument Count */
   }
   else
     puts("PASS");
-#endif /* !__linux */
+#endif /* !__linux && !__GLIBC__ */
 
  /*
   * Test UTF-8 to/from legacy charset (Windows 950)...
index 36707f29a65588782b4abf6914638b11fc2673b4..c295d478bfe1b4f4ae54490b6a41402ccbf53ce6 100644 (file)
@@ -658,6 +658,12 @@ main(int  argc,                            /* I - Number of command-line arguments */
     * Test localization...
     */
 
+    /* Force US English base locale */
+    putenv("LANG=en");
+    putenv("LC_ALL=en");
+    putenv("LC_CTYPE=en");
+    putenv("LC_MESSAGES=en");
+
     fputs("ppdLocalizeIPPReason(text): ", stdout);
     if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
         !strcmp(buffer, "Foo Reason"))
@@ -698,6 +704,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       printf("FAIL (\"%s\" instead of \"/help/foo/bar.html\")\n", buffer);
     }
 
+    /* Force French */
     putenv("LANG=fr");
     putenv("LC_ALL=fr");
     putenv("LC_CTYPE=fr");
@@ -713,6 +720,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       printf("FAIL (\"%s\" instead of \"La Long Foo Reason\")\n", buffer);
     }
 
+    /* Force Simplified Chinese */
     putenv("LANG=zh_TW");
     putenv("LC_ALL=zh_TW");
     putenv("LC_CTYPE=zh_TW");
@@ -732,6 +740,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * cupsMarkerName localization...
     */
 
+    /* Force US English base locale */
     putenv("LANG=en");
     putenv("LC_ALL=en");
     putenv("LC_CTYPE=en");
@@ -759,6 +768,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
              text ? text : "(null)");
     }
 
+    /* Force French locale */
     putenv("LANG=fr");
     putenv("LC_ALL=fr");
     putenv("LC_CTYPE=fr");
@@ -775,6 +785,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
              text ? text : "(null)");
     }
 
+    /* Force Simplified Chinese locale */
     putenv("LANG=zh_TW");
     putenv("LC_ALL=zh_TW");
     putenv("LC_CTYPE=zh_TW");
@@ -793,6 +804,12 @@ main(int  argc,                            /* I - Number of command-line arguments */
 
     ppdClose(ppd);
 
+    /* Force US English base locale */
+    putenv("LANG=en");
+    putenv("LC_ALL=en");
+    putenv("LC_CTYPE=en");
+    putenv("LC_MESSAGES=en");
+
    /*
     * Test new constraints...
     */
index 2f9630f5242ccd7a7318c505469ad0d4a14ca049..1af6d07417d85e4751a821af008150c0fe449f79 100755 (executable)
@@ -268,7 +268,7 @@ case "$usedebugprintfs" in
                echo "Enabling debug printfs (level $usedebugprintfs); log files can be found in $BASE/log..."
                CUPS_DEBUG_LOG="$BASE/log/debug_printfs.%d"; export CUPS_DEBUG_LOG
                CUPS_DEBUG_LEVEL="$usedebugprintfs"; export CUPS_DEBUG_LEVEL
-               CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cups.*Request|cupsGetResponse|cupsSend|mime).*$'; export CUPS_DEBUG_FILTER
+               CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cups.*Request|cupsGetResponse|cupsSend).*$'; export CUPS_DEBUG_FILTER
                ;;
 
        *)
@@ -443,14 +443,12 @@ EOF
 }
 
 ln -s $root/test/test.convs $BASE/share/mime
-ln -s $root/test/test.types $BASE/share/mime
 
 if test `uname` = Darwin; then
        instfilter cgimagetopdf imagetopdf pdf
        instfilter cgpdftopdf pdftopdf passthru
        instfilter cgpdftops pdftops ps
        instfilter cgpdftoraster pdftoraster raster
-       instfilter cgpdftoraster pdftourf raster
        instfilter cgtexttopdf texttopdf pdf
        instfilter pstocupsraster pstoraster raster
 else
@@ -458,7 +456,6 @@ else
        instfilter pdftopdf pdftopdf passthru
        instfilter pdftops pdftops ps
        instfilter pdftoraster pdftoraster raster
-       instfilter pdftoraster pdftourf raster
        instfilter pstoraster pstoraster raster
        instfilter texttopdf texttopdf pdf
 
@@ -776,6 +773,13 @@ echo "    $date by $user on `hostname`." >>$strfile
 echo "    <pre>" >>$strfile
 
 for file in 5*.sh; do
+       # Wait for jobs from the previous test to complete before running the
+       # next test...
+       if test $file != 5.1-lpadmin.sh; then
+               ./waitjobs.sh 1800
+       fi
+
+       # Run the test...
        echo $ac_n "Performing $file: $ac_c"
        echo "" >>$strfile
         echo "`date '+[%d/%b/%Y:%H:%M:%S %z]'` \"$file\":" >>$strfile
@@ -1040,7 +1044,7 @@ else
 fi
 
 # Warning log messages
-count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | wc -l | awk '{print $1}'`
+count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | $GREP -v 'libusb error' | $GREP -v ColorManager | $GREP -v 'Avahi client failed' | wc -l | awk '{print $1}'`
 if test $count != 8; then
        echo "FAIL: $count warning messages, expected 8."
        $GREP '^W ' $BASE/log/error_log
index 77a9ce01ed4ef3dfbdbd7dd94fa52f3148119f4f..57540aac43511702cb443be5b59ea38bd64c6328 100644 (file)
@@ -2,7 +2,6 @@
 application/pdf application/vnd.cups-pdf 100 pdftopdf
 application/pdf application/postscript 100 pdftops
 application/pdf application/vnd.cups-raster 100 pdftoraster
-application/pdf image/urf 100 pdftourf
 application/postscript application/vnd.cups-raster 100 pstoraster
 image/jpeg application/pdf 100 imagetopdf
 text/plain application/pdf 100 texttopdf