Replace get_os_name()
with get_os_type()
in get_lib_path()
(#11300)
In case of ubuntu system `get_os_name()` returns "ubuntu", but `get_os_type()` returns "Linux" which is expected by tests
This commit is contained in:
parent
ed030e113e
commit
d261da4820
@ -15,7 +15,7 @@ from pathlib import Path
|
|||||||
UTILS_DIR = os.path.dirname(os.path.abspath(__file__))
|
UTILS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
sys.path.insert(0, str(UTILS_DIR))
|
sys.path.insert(0, str(UTILS_DIR))
|
||||||
|
|
||||||
from platform_utils import get_os_name
|
from platform_utils import get_os_type
|
||||||
|
|
||||||
|
|
||||||
def expand_env_vars(obj):
|
def expand_env_vars(obj):
|
||||||
@ -34,7 +34,7 @@ def expand_env_vars(obj):
|
|||||||
|
|
||||||
def get_lib_path(lib_name):
|
def get_lib_path(lib_name):
|
||||||
"""Function for getting absolute path in OpenVINO directory to specific lib"""
|
"""Function for getting absolute path in OpenVINO directory to specific lib"""
|
||||||
os_name = get_os_name()
|
os_type = get_os_type()
|
||||||
all_libs = {
|
all_libs = {
|
||||||
'openvino_intel_cpu_plugin': {
|
'openvino_intel_cpu_plugin': {
|
||||||
'Windows': Path('runtime/bin/intel64/Release/openvino_intel_cpu_plugin.dll'),
|
'Windows': Path('runtime/bin/intel64/Release/openvino_intel_cpu_plugin.dll'),
|
||||||
@ -43,7 +43,7 @@ def get_lib_path(lib_name):
|
|||||||
'Windows': Path('runtime/bin/intel64/Release/openvino.dll'),
|
'Windows': Path('runtime/bin/intel64/Release/openvino.dll'),
|
||||||
'Linux': Path('runtime/lib/intel64/libopenvino.so')}
|
'Linux': Path('runtime/lib/intel64/libopenvino.so')}
|
||||||
}
|
}
|
||||||
return all_libs[lib_name][os_name]
|
return all_libs[lib_name][os_type]
|
||||||
|
|
||||||
|
|
||||||
def check_positive_int(val):
|
def check_positive_int(val):
|
||||||
|
Loading…
Reference in New Issue
Block a user