p->type |= CUPS_PRINTER_REMOTE;
- /*
- * Point the printer-uri-supported attribute to the
- * remote printer...
- */
-
- if (strchr(p->device_uri, '?'))
- {
- /*
- * Strip trailing "?options" from URI...
- */
-
- char resource[HTTP_MAX_URI], /* New URI */
- *ptr; /* Pointer into URI */
-
- strlcpy(resource, p->device_uri, sizeof(resource));
- if ((ptr = strchr(resource, '?')) != NULL)
- *ptr = '\0';
-
- ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
- "printer-uri-supported", NULL, resource);
- }
- else
- ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
- "printer-uri-supported", NULL, p->device_uri);
-
/*
* Then set the make-and-model accordingly...
*/
cat str-trailer.html >>$strfile
echo ""
+for file in $BASE/log/*_log; do
+ baselog=`basename $file`
+ cp $file $baselog-$date-$user
+ echo "Copied log file \"$baselog-$date-$user\" to test directory."
+done
+cp $strfile .
+echo "Copied report file \"cups-str-$date-$user.html\" to test directory."
-if test $fail != 0; then
- echo "$fail tests failed."
-
- for file in $BASE/log/*_log; do
- baselog=`basename $file`
- cp $file $baselog-$date-$user
- echo "Copied log file \"$baselog-$date-$user\" to test directory."
- done
- cp $strfile .
- echo "Copied report file \"cups-str-$date-$user.html\" to test directory."
+# Clean out old failure log files after 1 week...
+find . -name \*_log-\*-$user -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old log file \"" substr($1,3) "\" from test directory."}'
+find . -name cups-str-\*-$user.html -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old report file \"" $1 "\" from test directory."}'
- # Clean out old failure log files after 1 week...
- find . -name \*_log-\*-$user -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old log file \"" substr($1,3) "\" from test directory."}'
- find . -name cups-str-\*-$user.html -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old report file \"" $1 "\" from test directory."}'
+echo ""
- echo ""
+if test $fail != 0; then
+ echo "$fail tests failed."
exit 1
-
else
echo "All tests were successful."
- echo ""
- echo "Log files can be found in $BASE/log."
- echo "A HTML report was created in $strfile."
- echo ""
fi