lcameraDev: add resolve-only deviceSelector API and deduplicate resolve paths.
Export lcameraDev_resolveDeviceSelectorCReq for attach-identity consumers, factor live-camera snapshot helpers, and share resolveDeviceSelectorAgainstRecords with get-or-create session acquisition. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -45,6 +45,22 @@ TEST(FormatCameraListForDiagnosticsTest, ListsIndexedCameras)
|
||||
EXPECT_NE(text.find("location=front"), std::string::npos);
|
||||
}
|
||||
|
||||
TEST(ResolveDeviceSelectorAgainstRecordsTest, BakedUsbHdmiCameraMatchesExampleSelector)
|
||||
{
|
||||
const std::vector<CameraIdentityRecord> records =
|
||||
tests::bakedProfilesAsRecords(dellLaptopMachineTag);
|
||||
|
||||
const CameraIdentityRecord resolved =
|
||||
resolveDeviceSelectorAgainstRecords(
|
||||
"model-substr:HDMI;location:EXTERNAL",
|
||||
records);
|
||||
|
||||
EXPECT_EQ(
|
||||
resolved.id,
|
||||
"\\_SB_.PCI0.XHC_.RHUB.HS01-1:1.0-32e4:9415");
|
||||
EXPECT_EQ(resolved.locationLabel, "external");
|
||||
}
|
||||
|
||||
TEST(ResolveSelectorAgainstRecordsTest, BakedUsbHdmiCameraMatchesExampleSelector)
|
||||
{
|
||||
const std::vector<CameraIdentityRecord> records =
|
||||
|
||||
Reference in New Issue
Block a user