From eedc8d814c4b64593ef5ff77555d6fda51b9c71a Mon Sep 17 00:00:00 2001 From: Irina Efode Date: Wed, 15 Nov 2023 19:19:47 +0400 Subject: [PATCH] [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 --- .../functional_test_utils/src/ov_plugin_cache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tests/test_utils/functional_test_utils/src/ov_plugin_cache.cpp b/src/tests/test_utils/functional_test_utils/src/ov_plugin_cache.cpp index 483b9b98c38..3483506fc1e 100644 --- a/src/tests/test_utils/functional_test_utils/src/ov_plugin_cache.cpp +++ b/src/tests/test_utils/functional_test_utils/src/ov_plugin_cache.cpp @@ -58,10 +58,13 @@ std::shared_ptr 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()) {