commit | 8c2bbc2ba6f6de584db97a376e57077449e1de64 | [log] [tgz] |
---|---|---|
author | Aaron Massey <aaronmassey@google.com> | Tue May 24 22:43:33 2022 |
committer | Aaron Massey <aaronmassey@google.com> | Tue May 24 23:01:44 2022 |
tree | a7b1b116fb861ed4a0236b6011493dd4cdbf6ba1 | |
parent | 24080edd22bb45053bbf173a83f52db84f90c5dc [diff] |
Revert "virtual-usb-printer: fix unit tests" Revert submission 3607067 Reason for revert: b:233800358 - consistently failing the CQ Reverted Changes: Ic4fd5d8d8:virtual-usb-printer: Allow empty IPP responses Ic3970bf30:virtual-usb-printer: fix unit tests Change-Id: Idc647cc7f3a2ae2ca961302bc44b1dae24edc573 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/virtual-usb-printer/+/3664641 Reviewed-by: Greg Edelston <gredelston@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Aaron Massey <aaronmassey@google.com> Tested-by: Aaron Massey <aaronmassey@google.com>
Virtual USB Printer provides a server which can be used with USBIP in order to emulate a USB printing device and bind it to the system as if it were physically connected to a USB port.
Virtual USB Printer supports both regular USB printers as well as IPP-over-USB devices.
This project was created in order to make on-device tests which check for any regressions in the native USB printing system.
As of https://crrev.com/c/3093381, virtual-usb-printer
is built and installed by default on all test images that support it.
If for some reason you need to build it yourself, you can USE=usbip
when building packages for your board - i.e.
USE="usbip" ./build_packages --board=$BOARD
virtual-usb-printer
relies on usbip
to manifest as a virtual USB device. Most test images seem to come with this built-in by default. If you need to build your own kernel with usbip
support, make sure to build with CONFIG_USBIP_CORE
and CONFIG_USBIP_VHCI_HCD
.virtual-usb-printer
can behave like
For ease of human operation, start virtual-usb-printer
via its Upstart unit. Pass the appropriate arguments to the invocation as needed.
For example, to start and connect the virtual-usb-printer
as an IPP-over-USB printer, issue
start virtual-usb-printer USB_DESCRIPTORS=ippusb_printer.json IPP_ATTRIBUTES=ipp_attributes.json
Consult the Upstart config file to see the arguments understood in this context.
virtual-usb-printer
sends its output to the system log.The printer's USB descriptors and defined IPP attributes can be configured using a JSON file and are loaded at run-time using command line flags. Example configurations can be found in the config/
directory.
The configuration files can be loaded with the following flags:
--descriptors_path
- full path to the JSON file which defines the USB descriptors--attributes_path
- full path to the JSON file which defines the supported IPP attributes--record_doc_path
- full path to the file used to record documents received from print jobs--output_log_dir
- directory path specifying where scan settings will be loggedRefer to these existing tast tests for examples of how to use the virtual-usb-printer
to test the Chromium OS printing stack.