more verbose tests; should run w/o hammer installed system-wide
This commit is contained in:
parent
eb1cee7dee
commit
6e456e3daa
2 changed files with 25 additions and 17 deletions
|
|
@ -1,21 +1,23 @@
|
|||
# -*- python -*-
|
||||
Import('env')
|
||||
import os.path
|
||||
Import('env libhammer_shared')
|
||||
|
||||
pythonenv = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 0)
|
||||
|
||||
pythonenv.Append(CPPPATH = ['../../', '/usr/include/python2.7'])
|
||||
pythonenv.Append(CCFLAGS = ['-fpic', '-DSWIG', '-Wno-all', '-Wno-extra', '-Wno-error'])
|
||||
pythonenv.Append(LIBS = ['hammer'])
|
||||
pythonenv.Append(LIBPATH = ['../../'])
|
||||
#pythonenv.Append(LIBS = ['hammer'])
|
||||
#pythonenv.Append(LIBPATH = ['../../'])
|
||||
pythonenv.Append(SWIGFLAGS = ['-DHAMMER_INTERNAL__NO_STDARG_H', '-Isrc/', '-python'])
|
||||
|
||||
pythonenv.Command("hammer.i", "../swig/hammer.i", Copy("$TARGET", "$SOURCE"))
|
||||
|
||||
swig = ['hammer.i']
|
||||
|
||||
libhammer_python = pythonenv.SharedLibrary('hammer', swig, SHLIBPREFIX='_')
|
||||
libhammer_python = pythonenv.SharedLibrary('hammer', libhammer_shared + swig, SHLIBPREFIX='_')
|
||||
|
||||
pytestenv = pythonenv.Clone()
|
||||
pytestenv.Command(None, 'hammer_tests.py', "nosetests -v $SOURCE")
|
||||
pytestenv['ENV']['LD_LIBRARY_PATH'] = os.path.dirname(str(libhammer_shared[0]))
|
||||
pytestenv.Command(None, ['hammer_tests.py', libhammer_python], "nosetests -vv $SOURCE")
|
||||
|
||||
Clean('.', ['hammer.pyc', 'hammer_tests.py', 'hammer_tests.pyc'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue