| 52 | }; |
| 53 | |
| 54 | std::shared_ptr<udev_device> device_for_path(char const* devnode) |
| 55 | { |
| 56 | auto ctx = std::make_shared<mu::Context>(); |
| 57 | mu::Enumerator devices{ctx}; |
| 58 | |
| 59 | devices.scan_devices(); |
| 60 | |
| 61 | for (auto const& device : devices) |
| 62 | { |
| 63 | if (device.devnode() && strcmp(device.devnode(), devnode) == 0) |
| 64 | { |
| 65 | return device.as_raw(); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | BOOST_THROW_EXCEPTION(( |
| 70 | std::runtime_error{ |
| 71 | std::string{"Failed to find udev device for "} + devnode})); |
| 72 | } |
| 73 | |
| 74 | struct EvdevInputPlatform : public ::testing::TestWithParam<std::string> |
| 75 | { |
no test coverage detected