1717#include " intel_npu/npu_private_properties.hpp"
1818#include " openvino/util/xml_parse_utils.hpp"
1919
20+ using namespace ov ::test::utils;
21+ using namespace ov ::util::pugixml;
22+
2023class BackendName {
2124public:
2225 BackendName () {
23- const auto corePtr = ov::test::utils:: PluginCache::get ().core ();
26+ const auto corePtr = PluginCache::get ().core ();
2427 if (corePtr != nullptr ) {
2528 _name = getBackendName (*corePtr);
2629 } else {
@@ -32,14 +35,6 @@ class BackendName {
3235 return _name;
3336 }
3437
35- bool isEmpty () const noexcept {
36- return _name.empty ();
37- }
38-
39- bool isZero () const {
40- return _name == " LEVEL0" ;
41- }
42-
4338private:
4439 std::string _name;
4540 intel_npu::Logger _log = intel_npu::Logger(" BackendName" , ov::log::Level::INFO);
@@ -48,26 +43,37 @@ class BackendName {
4843class AvailableDevices {
4944public:
5045 AvailableDevices () {
51- const auto corePtr = ov::test::utils:: PluginCache::get ().core ();
46+ const auto corePtr = PluginCache::get ().core ();
5247 if (corePtr != nullptr ) {
53- _availableDevices = ::getAvailableDevices (*corePtr);
48+ _availableDevices.push_back (getTestPlatform ());
49+
50+ if (_availableDevices.empty ()) {
51+ auto deviceName = getDeviceName ();
52+ if (!deviceName.empty ()) {
53+ _availableDevices.push_back (getDeviceNameID (deviceName));
54+ }
55+ }
56+
57+ if (_availableDevices.empty ()) {
58+ _availableDevices = ::getAvailableDevices (*corePtr);
59+ }
5460 } else {
5561 _log.error (" Failed to get OpenVINO Core from cache!" );
5662 }
5763
5864 // Private device names may be registered via environment variables
5965 const std::string environmentDevice =
60- ov::test::utils:: getTestsPlatformFromEnvironmentOr (ov::intel_npu::Platform::AUTO_DETECT.data ());
66+ getTestsPlatformFromEnvironmentOr (ov::intel_npu::Platform::AUTO_DETECT.data ());
6167 const std::string standardizedEnvironmentDevice = ov::intel_npu::Platform::standardize (environmentDevice);
6268
6369 if (std::all_of (_availableDevices.begin (), _availableDevices.end (), [&](const std::string& deviceName) {
6470 return deviceName.find (standardizedEnvironmentDevice) == std::string::npos;
6571 })) {
66- _availableDevices.push_back (standardizedEnvironmentDevice);
72+ _availableDevices.push_back (getDeviceNameID ( standardizedEnvironmentDevice) );
6773 }
6874
6975 auto driverVersionPropetry =
70- corePtr->get_property (ov::test::utils:: DEVICE_NPU, ov::intel_npu::driver_version.name ());
76+ corePtr->get_property (DEVICE_NPU, ov::intel_npu::driver_version.name ());
7177 _driverVersion = driverVersionPropetry.as <std::string>();
7278
7379 }
@@ -76,20 +82,10 @@ class AvailableDevices {
7682 return _availableDevices;
7783 }
7884
79- auto count () const {
80- return _availableDevices.size ();
81- }
82-
8385 const std::string& getDriverVersion () const {
8486 return _driverVersion;
8587 }
8688
87- bool has3720 () const {
88- return std::any_of (_availableDevices.begin (), _availableDevices.end (), [](const std::string& deviceName) {
89- return deviceName.find (" 3720" ) != std::string::npos;
90- });
91- }
92-
9389private:
9490 std::vector<std::string> _availableDevices;
9591 std::string _driverVersion;
@@ -110,14 +106,6 @@ class CurrentOS {
110106 return _name;
111107 }
112108
113- bool isLinux () const {
114- return _name == " linux" ;
115- }
116-
117- bool isWindows () const {
118- return _name == " windows" ;
119- }
120-
121109private:
122110 std::string _name;
123111};
@@ -255,10 +243,10 @@ std::vector<std::string> disabledTestPatterns() {
255243 const CurrentOS currentOS;
256244
257245 try {
258- const auto & filePath = ov::test::utils:: NpuTestEnvConfig::getInstance ().OV_NPU_TESTS_SKIP_CONFIG_FILE ;
246+ const auto & filePath = NpuTestEnvConfig::getInstance ().OV_NPU_TESTS_SKIP_CONFIG_FILE ;
259247 _log.info (" Using %s as skip config" , filePath.c_str ());
260248
261- auto xmlResult = ov::util::pugixml:: parse_xml (filePath.c_str ());
249+ auto xmlResult = parse_xml (filePath.c_str ());
262250 // Error returned from pugixml, fallback to legacy skips
263251 if (!xmlResult.error_msg .empty ()) {
264252 _log.error (xmlResult.error_msg .c_str ());
0 commit comments