Test ABI for structures and reorganize tests a bit.
This commit is contained in:
parent
cc4e4631bd
commit
69a78d0a54
5 changed files with 392 additions and 24 deletions
32
llvm/tests/__init__.py
Normal file
32
llvm/tests/__init__.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from __future__ import print_function
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
import llvm
|
||||
|
||||
tests = []
|
||||
|
||||
def run(verbosity=1):
|
||||
print('llvmpy is installed in: ' + os.path.dirname(__file__))
|
||||
print('llvmpy version: ' + llvm.__version__)
|
||||
print(sys.version)
|
||||
|
||||
files = filter(lambda s: s.startswith('test_') and s.endswith('.py'),
|
||||
os.listdir(os.path.dirname(__file__)))
|
||||
|
||||
for f in files:
|
||||
fname = f.split('.', 1)[0]
|
||||
__import__('.'.join([__name__, fname]))
|
||||
|
||||
suite = unittest.TestSuite()
|
||||
for cls in tests:
|
||||
suite.addTest(unittest.makeSuite(cls))
|
||||
|
||||
# The default stream fails in IPython qtconsole on Windows,
|
||||
# so just using sys.stdout
|
||||
runner = unittest.TextTestRunner(verbosity=verbosity, stream=sys.stdout)
|
||||
return runner.run(suite)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue