mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
133 lines
3.9 KiB
Python
133 lines
3.9 KiB
Python
# -*- python -*-
|
|
#
|
|
# Copyright (c) 2016 Stefan Seefeld
|
|
# All rights reserved.
|
|
#
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
|
# http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
Import('env')
|
|
|
|
# libs needed for embedding
|
|
ELIBS=env['LIBS'] + env['PYTHONLIBS']
|
|
|
|
def BPLTest(env, name, sources = None, script = None):
|
|
run = env.BoostRunPythonScript(name + '.py')
|
|
if sources:
|
|
for source in sources:
|
|
Depends(run,
|
|
env.PythonExtension(source != name and source or (source + '_ext'), source + '.cpp')
|
|
)
|
|
else:
|
|
Depends(run, env.PythonExtension(name + '_ext', name + '.cpp'))
|
|
return run
|
|
|
|
env.AddMethod(BPLTest)
|
|
|
|
env.AppendENVPath('PYTHONPATH', Dir('.').path)
|
|
|
|
tests=[]
|
|
tests+=env.BPLTest('crossmod_exception', ['crossmod_exception_a', 'crossmod_exception_b'])
|
|
|
|
for test in ['injected',
|
|
'properties',
|
|
'return_arg',
|
|
'staticmethod',
|
|
'shared_ptr',
|
|
'enable_shared_from_this',
|
|
'andreas_beyer',
|
|
'polymorphism',
|
|
'polymorphism2',
|
|
'wrapper_held_type',
|
|
'polymorphism2_auto_ptr',
|
|
'auto_ptr',
|
|
'minimal',
|
|
'args',
|
|
'raw_ctor',
|
|
#'numpy',
|
|
'enum',
|
|
'exception_translator']:
|
|
tests+=env.BPLTest(test)
|
|
|
|
tests+=env.BPLTest('test_cltree', ['cltree'])
|
|
tests+=env.BPLTest('newtest', ['m1', 'm2'])
|
|
tests+=env.BPLTest('const_argument')
|
|
tests+=env.BPLTest('keywords_test', ['keywords'])
|
|
Depends(
|
|
env.BoostRunPythonScript('test_builtin_converters.py'),
|
|
env.PythonExtension('builtin_converters_ext', 'test_builtin_converters.cpp')
|
|
)
|
|
|
|
for test in ['test_pointer_adoption',
|
|
'operators',
|
|
'operators_wrapper',
|
|
'callbacks',
|
|
'defaults',
|
|
'object',
|
|
'list',
|
|
'long',
|
|
'dict',
|
|
'tuple',
|
|
'str',
|
|
'slice',
|
|
'virtual_functions',
|
|
'back_reference',
|
|
'implicit',
|
|
'data_members',
|
|
'ben_scott1',
|
|
'bienstman1',
|
|
'bienstman2',
|
|
'bienstman3',
|
|
'multi_arg_constructor']:
|
|
tests+=env.BPLTest(test)
|
|
|
|
tests+=env.BPLTest('iterator', ['iterator', 'input_iterator'])
|
|
tests+=env.BPLTest('stl_iterator')
|
|
tests+=env.BPLTest('extract')
|
|
tests+=env.BPLTest('crossmod_opaque', ['crossmod_opaque_a', 'crossmod_opaque_b'])
|
|
|
|
for test in ['opaque',
|
|
'voidptr',
|
|
'pickle1',
|
|
'pickle2',
|
|
'pickle3',
|
|
'pickle4',
|
|
'nested',
|
|
'docstring',
|
|
'pytype_function',
|
|
'vector_indexing_suite',
|
|
'pointer_vector']:
|
|
tests+=env.BPLTest(test)
|
|
|
|
Depends(
|
|
env.BoostRunPythonScript('map_indexing_suite.py'),
|
|
env.PythonExtension('map_indexing_suite_ext', [
|
|
'map_indexing_suite.cpp',
|
|
'int_map_indexing_suite.cpp',
|
|
'a_map_indexing_suite.cpp'])
|
|
)
|
|
|
|
tests+=env.BoostRunTest('import_', 'import_.cpp', '${SOURCES[0]} ${SOURCES[1]}', 'import_.py', LIBS=ELIBS)
|
|
|
|
tests+=env.BoostCompileTest('indirect_traits_test')
|
|
tests+=env.BoostRunTests(['destroy_test',
|
|
'pointer_type_id_test',
|
|
'bases',
|
|
'if_else',
|
|
'pointee',
|
|
'result'], LIBS=ELIBS)
|
|
|
|
tests+=env.BoostCompileTests(['string_literal',
|
|
'borrowed',
|
|
'object_manager',
|
|
'copy_ctor_mutates_rhs'])
|
|
|
|
tests+=env.BoostRunTest('upcast', LIBS=ELIBS)
|
|
tests+=env.BoostCompileTest('select_holder')
|
|
tests+=env.BoostRunTest('select_from_python_test', LIBS=ELIBS)
|
|
tests+=env.BoostCompileTest('select_arg_to_python_test')
|
|
|
|
env.BoostTestSummary(tests)
|
|
AlwaysBuild(tests)
|