fix(usb): Make string descriptor checks in unit tests optional

Checking for an exact match for product or serial and string descriptors can
lead to test failures if the USB devices connected to the runner is changed. This
commit adds some kconfig options to make the string descriptor checks optional,
with the product and serial string checks being disabled by default.
This commit is contained in:
Darian Leung
2024-05-30 19:25:18 +08:00
committed by BOT
parent c66f46cb77
commit ceb1c01cc5
2 changed files with 36 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
menu "USB Host Library Test"
config USB_HOST_TEST_CHECK_MANU_STR
bool "Check manufacturer string descriptor"
default y
help
USB Host tests that check string descriptors will check the manufacturer string
descriptor of the connected device.
config USB_HOST_TEST_CHECK_PROD_STR
bool "Check product string descriptor"
default n
help
USB Host tests that check string descriptors will check the product string descriptor
of the connected device.
config USB_HOST_TEST_CHECK_SERIAL_STR
bool "Check serial string descriptor"
default n
help
USB Host tests that check string descriptors will check the serial string descriptor
of the connected device.
endmenu