[IE TESTS ]Checking path of TEMPLATE plugin for OV_PLUGIN_CACHE (#20960)
* [IE TESTS] Change path of TEMPLATE plugin for OV_PLUGIN_CACHE * fix code style * partial revert revert * Update ov_plugin_cache.cpp
This commit is contained in:
@@ -58,10 +58,13 @@ std::shared_ptr<ov::Core> PluginCache::core(const std::string& deviceToCheck) {
|
||||
// Register Template plugin as a reference provider
|
||||
const auto devices = ov_core->get_available_devices();
|
||||
if (std::find(devices.begin(), devices.end(), std::string(ov::test::utils::DEVICE_TEMPLATE)) == devices.end()) {
|
||||
ov_core->register_plugin(
|
||||
auto plugin_path =
|
||||
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
|
||||
std::string(ov::test::utils::TEMPLATE_LIB) + OV_BUILD_POSTFIX),
|
||||
ov::test::utils::DEVICE_TEMPLATE);
|
||||
std::string(ov::test::utils::TEMPLATE_LIB) + OV_BUILD_POSTFIX);
|
||||
if (!ov::util::file_exists(plugin_path)) {
|
||||
throw std::runtime_error("Plugin: " + plugin_path + " does not exists!");
|
||||
}
|
||||
ov_core->register_plugin(plugin_path, ov::test::utils::DEVICE_TEMPLATE);
|
||||
}
|
||||
|
||||
if (!deviceToCheck.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user