Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
setting folder for windows binares
Browse files Browse the repository at this point in the history
  • Loading branch information
mseth10 committed Aug 7, 2019
1 parent 5ee2195 commit 0f804cb
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/python/unittest/test_library_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ def check_platform():
def test_library_loading():
if (os.name=='posix'):
lib = 'libsample_lib.so'
if os.path.exists(lib):
fname = lib
elif os.path.exists('build/'+lib):
fname = 'build/'+lib
else:
raise MXNetError("library %s not found " % lib)
elif (os.name=='nt'):
lib = 'libsample_lib.dll'
if os.path.exists('windows_package\\lib\\'+lib):
fname = 'windows_package\\lib\\'+lib
else:
raise MXNetError("library %s not found " % lib)

if os.path.exists(lib):
libdir = ''
elif os.path.exists('build/'+lib):
libdir = 'build/'
else:
raise MXNetError("library %s not found " % lib)

fname = libdir + lib
fname = os.path.abspath(fname)
mx.library.load(fname)

0 comments on commit 0f804cb

Please sign in to comment.