Skip to content

Commit

Permalink
Make more obvious the testing and simple(?). Idea is to CI it later.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryobg committed Feb 15, 2018
1 parent b8f3f05 commit f68e4a3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 44 deletions.
44 changes: 0 additions & 44 deletions JContainers/jc_debug.py

This file was deleted.

25 changes: 25 additions & 0 deletions tools/test.py
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)

0 comments on commit f68e4a3

Please sign in to comment.