From abf025f0a5c537f0b2ab07da933ffb82f62418ef Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Mon, 6 Apr 2020 11:17:29 -0500 Subject: uhd: Add fuzzy serial number checking We have integer 32-bit serial numbers for MPM devices, for example "1234abcd". For serial numbers which have less than eight digits, e.g. "123abcd", a user may feel inclined to prefix this number with a 0 when they are searching for devices, e.g. "0123abcd". This change makes it so that specifying "0123abcd" will match a device with serial number "123ABCD". --- host/tests/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host/tests/CMakeLists.txt') diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index f9f94e023..828729b79 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -269,6 +269,12 @@ UHD_ADD_NONAPI_TEST( ${CMAKE_SOURCE_DIR}/lib/transport/offload_io_service.cpp ) +UHD_ADD_NONAPI_TEST( + TARGET "serial_number_test.cpp" + EXTRA_SOURCES + ${CMAKE_SOURCE_DIR}/lib/utils/serial_number.cpp +) + ######################################################################## # demo of a loadable module ######################################################################## -- cgit v1.2.3