7
7
from cuda .bindings import path_finder
8
8
from cuda .bindings ._path_finder import supported_libs
9
9
10
- ALL_LIBNAMES = path_finder .SUPPORTED_LIBNAMES + supported_libs .PARTIALLY_SUPPORTED_LIBNAMES
10
+ ALL_LIBNAMES = path_finder .SUPPORTED_LIBNAMES + supported_libs .PARTIALLY_SUPPORTED_LIBNAMES_ALL
11
+ ALL_LIBNAMES_LINUX = path_finder .SUPPORTED_LIBNAMES + supported_libs .PARTIALLY_SUPPORTED_LIBNAMES_LINUX
12
+ ALL_LIBNAMES_WINDOWS = path_finder .SUPPORTED_LIBNAMES + supported_libs .PARTIALLY_SUPPORTED_LIBNAMES_WINDOWS
11
13
if os .environ .get ("CUDA_BINDINGS_PATH_FINDER_TEST_ALL_LIBNAMES" , False ):
12
- TEST_LIBNAMES = ALL_LIBNAMES
14
+ if sys .platform == "win32" :
15
+ TEST_FIND_OR_LOAD_LIBNAMES = ALL_LIBNAMES_WINDOWS
16
+ else :
17
+ TEST_FIND_OR_LOAD_LIBNAMES = ALL_LIBNAMES_LINUX
13
18
else :
14
- TEST_LIBNAMES = path_finder .SUPPORTED_LIBNAMES
19
+ TEST_FIND_OR_LOAD_LIBNAMES = path_finder .SUPPORTED_LIBNAMES
15
20
16
21
17
22
def test_all_libnames_linux_sonames_consistency ():
18
- assert tuple (sorted (ALL_LIBNAMES )) == tuple (sorted (supported_libs .SUPPORTED_LINUX_SONAMES .keys ()))
23
+ assert tuple (sorted (ALL_LIBNAMES_LINUX )) == tuple (sorted (supported_libs .SUPPORTED_LINUX_SONAMES .keys ()))
19
24
20
25
21
26
def test_all_libnames_windows_dlls_consistency ():
22
- assert tuple (sorted (ALL_LIBNAMES )) == tuple (sorted (supported_libs .SUPPORTED_WINDOWS_DLLS .keys ()))
27
+ assert tuple (sorted (ALL_LIBNAMES_WINDOWS )) == tuple (sorted (supported_libs .SUPPORTED_WINDOWS_DLLS .keys ()))
23
28
24
29
25
30
def test_all_libnames_libnames_requiring_os_add_dll_directory_consistency ():
26
- assert not (set (supported_libs .LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY ) - set (ALL_LIBNAMES ))
31
+ assert not (set (supported_libs .LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY ) - set (ALL_LIBNAMES_WINDOWS ))
27
32
28
33
29
34
def test_all_libnames_expected_lib_symbols_consistency ():
@@ -45,11 +50,8 @@ def _build_subprocess_failed_for_libname_message(libname, result):
45
50
46
51
47
52
@pytest .mark .parametrize ("api" , ("find" , "load" ))
48
- @pytest .mark .parametrize ("libname" , TEST_LIBNAMES )
53
+ @pytest .mark .parametrize ("libname" , TEST_FIND_OR_LOAD_LIBNAMES )
49
54
def test_find_or_load_nvidia_dynamic_library (info_summary_append , api , libname ):
50
- if sys .platform == "win32" and not supported_libs .SUPPORTED_WINDOWS_DLLS [libname ]:
51
- pytest .skip (f"{ libname = !r} not supported on { sys .platform = } " )
52
-
53
55
if libname == "nvJitLink" and not _check_nvjitlink_usable ():
54
56
pytest .skip (f"{ libname = !r} not usable" )
55
57
0 commit comments