forked from ryobg/JContainers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make more obvious the testing and simple(?). Idea is to CI it later.
- Loading branch information
Showing
2 changed files
with
25 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
import ctypes | ||
|
||
if __name__ == '__main__': | ||
|
||
if len(sys.argv) < 2: | ||
print("Usage: test.py <JContainers DLL filepath>") | ||
sys.exit(1) | ||
|
||
argv = ('', '--gtest_filter=*.*') | ||
|
||
errno = -1 | ||
try: | ||
lib = ctypes.cdll.LoadLibrary(sys.argv[1]) | ||
cargs = (ctypes.c_char_p * len(argv))() | ||
for i in range(len(argv)): | ||
cargs[i] = argv[i].encode('utf-8') | ||
errno = lib.JC_runTests(len(argv), ctypes.byref(cargs)) | ||
except BaseException as e: | ||
print("Error:", e) | ||
except: | ||
print("Unexpected error:", sys.exc_info()[0]) | ||
sys.exit (errno) | ||
|