diff options
-rw-r--r-- | unittest/conftest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/unittest/conftest.py b/unittest/conftest.py index ef4539c..a53b005 100644 --- a/unittest/conftest.py +++ b/unittest/conftest.py @@ -36,13 +36,15 @@ def C(request): import os, sys path_build = os.path.join("..", "build") paths = [ + os.environ.get('LIBNK_PATH', None), os.path.join(path_build,"libnitrokey.so"), os.path.join(path_build,"libnitrokey.dylib"), os.path.join(path_build,"libnitrokey.dll"), os.path.join(path_build,"nitrokey.dll"), ] for p in paths: - print(p) + if not p: continue + print("Trying " +p) p = os.path.abspath(p) if os.path.exists(p): print("Found: "+p) @@ -50,7 +52,6 @@ def C(request): break else: print("File does not exist: " + p) - print("Trying another") if not C: print("No library file found") sys.exit(1) |