Lines Matching refs:vm

70     bool add(HalManifest &vm, ManifestHal &&hal) {  in add()
71 return vm.add(std::move(hal)); in add()
101 const ManifestHal *getAnyHal(HalManifest &vm, const std::string &name) { in getAnyHal()
102 return vm.getAnyHal(name); in getAnyHal()
107 ConstMultiMapValueIterable<std::string, ManifestHal> getHals(const HalManifest& vm) { in getHals()
108 return vm.getHals(); in getHals()
110 std::vector<const ManifestHal*> getHals(const HalManifest& vm, const std::string& name) { in getHals()
111 return vm.getHals(name); in getHals()
139 HalManifest vm; in testDeviceManifest() local
140 vm.mType = SchemaType::DEVICE; in testDeviceManifest()
141 vm.device.mSepolicyVersion = {25, 0}; in testDeviceManifest()
142 vm.add(ManifestHal{HalFormat::HIDL, in testDeviceManifest()
148 vm.add(ManifestHal{HalFormat::HIDL, in testDeviceManifest()
154 return vm; in testDeviceManifest()
157 HalManifest vm = testDeviceManifest(); in testDeviceManifestWithXmlFile() local
161 vm.addXmlFile(std::move(xmlFile)); in testDeviceManifestWithXmlFile()
162 return vm; in testDeviceManifestWithXmlFile()
165 HalManifest vm; in testFrameworkManfiest() local
166 vm.mType = SchemaType::FRAMEWORK; in testFrameworkManfiest()
167 vm.add(ManifestHal{HalFormat::HIDL, in testFrameworkManfiest()
180 vm.framework.mVndks = { std::move(vndk2505), std::move(vndk2513) }; in testFrameworkManfiest()
182 return vm; in testFrameworkManfiest()
224 HalManifest vm = testDeviceManifest(); in TEST_F() local
225 EXPECT_EQ(dump(vm), "hidl/android.hardware.camera/hwbinder/2.0:" in TEST_F()
239 HalManifest vm = testDeviceManifest(); in TEST_F() local
240 EXPECT_EQ(Transport::HWBINDER, vm.getHidlTransport("android.hardware.camera", in TEST_F()
272 HalManifest vm = testDeviceManifest(); in TEST_F() local
274 gHalManifestConverter(vm, SerializeFlags::NO_TAGS.enableHals().enableSepolicy()); in TEST_F()
306 EXPECT_EQ(vm, vm2); in TEST_F()
310 HalManifest vm = testFrameworkManfiest(); in TEST_F() local
311 std::string xml = gHalManifestConverter(vm, SerializeFlags::NO_TAGS.enableHals().enableVndk()); in TEST_F()
337 EXPECT_EQ(vm, vm2); in TEST_F()
341 HalManifest vm; in TEST_F() local
342 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
344 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
352 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
362 HalManifest vm; in TEST_F() local
363 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
371 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
384 HalManifest vm; in TEST_F() local
385 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
395 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
412 HalManifest vm; in TEST_F() local
413 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
435 vm.getHidlTransport("android.hidl.manager", {2, 1}, "IServiceManager", "default")); in TEST_F()
437 vm.getHidlTransport("android.hidl.manager", {2, 0}, "IServiceManager", "default")); in TEST_F()
439 vm.getHidlTransport("android.hidl.manager", {2, 2}, "IServiceManager", "default")); in TEST_F()
441 vm.getHidlTransport("android.hidl.manager", {1, 0}, "IServiceManager", "default")); in TEST_F()
445 HalManifest vm = testDeviceManifest(); in TEST_F() local
446 EXPECT_EQ(vm.getHidlInstances("android.hardware.camera", {2, 0}, "ICamera"), in TEST_F()
448 EXPECT_EQ(vm.getHidlInstances("android.hardware.camera", {2, 0}, "IBetterCamera"), in TEST_F()
450 EXPECT_EQ(vm.getHidlInstances("android.hardware.camera", {2, 0}, "INotExist"), in TEST_F()
452 EXPECT_EQ(vm.getHidlInstances("android.hardware.nfc", {1, 0}, "INfc"), in TEST_F()
455 EXPECT_TRUE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "ICamera", "default")); in TEST_F()
456 EXPECT_TRUE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "ICamera", "legacy/0")); in TEST_F()
457 EXPECT_TRUE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "IBetterCamera", "camera")); in TEST_F()
458 EXPECT_TRUE(vm.hasHidlInstance("android.hardware.nfc", {1, 0}, "INfc", "default")); in TEST_F()
460 EXPECT_FALSE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "INotExist", "default")); in TEST_F()
461 EXPECT_FALSE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "ICamera", "notexist")); in TEST_F()
462 EXPECT_FALSE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "IBetterCamera", "default")); in TEST_F()
463 EXPECT_FALSE(vm.hasHidlInstance("android.hardware.camera", {2, 0}, "INotExist", "notexist")); in TEST_F()
464 EXPECT_FALSE(vm.hasHidlInstance("android.hardware.nfc", {1, 0}, "INfc", "notexist")); in TEST_F()
705 HalManifest vm = testDeviceManifest(); in TEST_F() local
706 EXPECT_EQ(vm.getHalNames(), std::set<std::string>( in TEST_F()
711 HalManifest vm = testDeviceManifest(); in TEST_F() local
712 EXPECT_NE(getAnyHal(vm, "android.hardware.camera"), nullptr); in TEST_F()
713 EXPECT_EQ(getAnyHal(vm, "non-existent"), nullptr); in TEST_F()
717 for (const auto &hal : getHals(vm)) { in TEST_F()
723 HalManifest vm; in TEST_F() local
724 EXPECT_TRUE(add(vm, ManifestHal{HalFormat::HIDL, in TEST_F()
730 EXPECT_TRUE(add(vm, ManifestHal{HalFormat::HIDL, in TEST_F()
736 EXPECT_TRUE(add(vm, ManifestHal{HalFormat::HIDL, in TEST_F()
760 auto cameraHals = getHals(vm, "android.hardware.camera"); in TEST_F()
764 auto nfcHals = getHals(vm, "android.hardware.nfc"); in TEST_F()
1297 HalManifest vm = testDeviceManifestWithXmlFile(); in TEST_F() local
1299 vm, SerializeFlags::NO_TAGS.enableHals().enableSepolicy().enableXmlFiles()); in TEST_F()
1335 EXPECT_EQ(vm, vm2); in TEST_F()
3441 HalManifest vm = testDeviceManifest(); in TEST_F() local
3442 EXPECT_EQ(vm.getHalNamesAndVersions(), in TEST_F()