diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-10-10 18:25:32 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-10-10 18:25:32 +0200 |
commit | 343e4b1e6d53f042df84e951209b5a33b9a617c3 (patch) | |
tree | ba771942520fe6649d6e47a223814a260b9c5f31 /unittest/conftest.py | |
parent | fa871ecba4333ffe9a96b0a662b9d77089cf69b7 (diff) | |
parent | be675e293fe94a4a6926125a61e67e92e8788d8a (diff) | |
download | libnitrokey-343e4b1e6d53f042df84e951209b5a33b9a617c3.tar.gz libnitrokey-343e4b1e6d53f042df84e951209b5a33b9a617c3.tar.bz2 |
Merge branch 'test_organize'
Improve test organization
Disable CRC check
Improve log
Diffstat (limited to 'unittest/conftest.py')
-rw-r--r-- | unittest/conftest.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/unittest/conftest.py b/unittest/conftest.py index 04e85ff..ef4539c 100644 --- a/unittest/conftest.py +++ b/unittest/conftest.py @@ -20,24 +20,25 @@ def C(request): with open(fp, 'r') as f: declarations = f.readlines() + cnt = 0 a = iter(declarations) for declaration in a: if declaration.strip().startswith('NK_C_API'): declaration = declaration.replace('NK_C_API', '').strip() while ';' not in declaration: declaration += (next(a)).strip() - print(declaration) + # print(declaration) ffi.cdef(declaration, override=True) + cnt +=1 + print('Imported {} declarations'.format(cnt)) C = None import os, sys path_build = os.path.join("..", "build") paths = [ - os.path.join(path_build,"libnitrokey-log.so"), os.path.join(path_build,"libnitrokey.so"), - os.path.join(path_build,"libnitrokey-log.dll"), + os.path.join(path_build,"libnitrokey.dylib"), os.path.join(path_build,"libnitrokey.dll"), - os.path.join(path_build,"nitrokey-log.dll"), os.path.join(path_build,"nitrokey.dll"), ] for p in paths: @@ -75,6 +76,7 @@ def C(request): print('Finished') request.addfinalizer(fin) - C.NK_set_debug(True) + # C.NK_set_debug(True) + C.NK_set_debug_level(3) return C |