1 # Copyright David Abrahams 2006. Distributed under the Boost
2 # Software License, Version 1.0. (See accompanying
3 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 import ../../config/checks/config : requires ;
11 use-project /boost/python : ../build ;
12 project /boost/python/test
14 <toolset>gcc:<cxxflags>-Wextra
15 <target-os>qnxnto:<library>socket
19 if [ python.configured ]
21 PY = /python//python ;
24 rule py-run ( sources * : input-file ? )
26 return [ run $(sources) /boost/python//boost_python $(PY)
30 <define>BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION
35 rule py-compile ( sources * )
37 return [ compile $(sources) /boost/python//boost_python ] ;
40 rule py-compile-fail ( sources * )
42 return [ compile-fail $(sources) /boost/python//boost_python ] ;
45 rule require-windows ( properties * )
47 if ! <target-os>windows in $(properties)
53 if [ python.configured ]
59 run exec.cpp /boost/python//boost_python/<link>static $(PY)
61 : exec.py # input files
67 run exec.cpp ../build//boost_python/<link>shared /python//python
71 : exec-dynamic # target-name
75 # run import_.cpp ../build//boost_python /python//python
77 # : import_.py # input files
83 bpl-test crossmod_exception
84 : crossmod_exception.py crossmod_exception_a.cpp crossmod_exception_b.cpp
88 [ bpl-test properties ]
89 [ bpl-test return_arg ]
90 [ bpl-test staticmethod ]
91 [ bpl-test boost_shared_ptr ]
94 : [ requires cxx11_smart_ptr ]
96 [ bpl-test enable_shared_from_this ]
97 [ bpl-test andreas_beyer ]
98 [ bpl-test wrapper_held_type ]
100 [ bpl-test polymorphism2_auto_ptr
101 : polymorphism2_auto_ptr.py polymorphism2.py polymorphism2_auto_ptr.cpp
102 : [ requires auto_ptr ]
105 [ bpl-test polymorphism ]
106 [ bpl-test polymorphism2 ]
110 : [ requires auto_ptr ]
115 [ bpl-test raw_ctor ]
116 [ bpl-test enum : test_enum.py enum_ext.cpp ]
117 [ bpl-test exception_translator ]
118 [ bpl-test pearu1 : test_cltree.py cltree.cpp ]
119 [ bpl-test try : newtest.py m1.cpp m2.cpp ]
120 [ bpl-test const_argument ]
121 [ bpl-test keywords : keywords.cpp keywords_test.py ]
124 [ python-extension builtin_converters_ext : builtin_converters.cpp /boost/python//boost_python ]
125 [ bpl-test builtin_converters : test_builtin_converters.py builtin_converters_ext ]
127 [ bpl-test test_pointer_adoption ]
128 [ bpl-test operators ]
129 [ bpl-test operators_wrapper ]
130 [ bpl-test callbacks ]
131 [ bpl-test defaults ]
135 [ bpl-test aligned_class ]
143 [ bpl-test virtual_functions ]
144 [ bpl-test back_reference ]
145 [ bpl-test implicit ]
146 [ bpl-test data_members ]
148 [ bpl-test ben_scott1 ]
150 [ bpl-test bienstman1 ]
151 [ bpl-test bienstman2 ]
152 [ bpl-test bienstman3 ]
154 [ bpl-test multi_arg_constructor
157 # A bug in the Win32 intel compilers causes compilation of one of our
158 # tests to take forever when debug symbols are enabled. This rule
159 # turns them off when added to the requirements section
160 <toolset>intel-win:<debug-symbols>off
163 [ bpl-test iterator : iterator.py iterator.cpp input_iterator.cpp ]
165 [ bpl-test stl_iterator : stl_iterator.py stl_iterator.cpp ]
170 bpl-test crossmod_opaque
171 : crossmod_opaque.py crossmod_opaque_a.cpp crossmod_opaque_b.cpp
183 [ bpl-test docstring ]
184 [ bpl-test pytype_function ]
186 [ bpl-test vector_indexing_suite ]
188 [ bpl-test pointer_vector
191 # Turn off this test on HP CXX, as the test hangs when executing.
192 # Whenever the cause for the failure of the polymorphism test is found
193 # and fixed, this should be retested.
194 <toolset>hp_cxx:<build>no ]
196 [ python-extension map_indexing_suite_ext
197 : map_indexing_suite.cpp int_map_indexing_suite.cpp a_map_indexing_suite.cpp
198 /boost/python//boost_python ]
200 map_indexing_suite : map_indexing_suite.py map_indexing_suite_ext ]
202 [ run import_.cpp /boost/python//boost_python $(PY) : : import_.py ]
204 # if $(TEST_BIENSTMAN_NON_BUGS)
206 # bpl-test bienstman4 ;
207 # bpl-test bienstman5 ;
210 [ bpl-test calling_conventions : : <conditional>@require-windows ]
211 [ bpl-test calling_conventions_mf : : <conditional>@require-windows ]
213 # --- unit tests of library components ---
215 [ compile indirect_traits_test.cpp ]
216 [ run destroy_test.cpp ]
217 [ py-run pointer_type_id_test.cpp ]
220 [ py-run pointee.cpp ]
223 [ compile string_literal.cpp ]
224 [ py-compile borrowed.cpp ]
225 [ py-compile object_manager.cpp ]
226 [ py-compile copy_ctor_mutates_rhs.cpp ]
228 [ py-run upcast.cpp ]
230 [ py-compile select_holder.cpp ]
232 [ run select_from_python_test.cpp ../src/converter/type_id.cpp
235 : <define>BOOST_PYTHON_STATIC_LIB
240 [ py-compile select_arg_to_python_test.cpp ]
242 [ py-compile-fail ./raw_pyobject_fail1.cpp ]
243 [ py-compile-fail ./raw_pyobject_fail2.cpp ]
244 [ py-compile-fail ./as_to_python_function.cpp ]
245 [ py-compile-fail ./object_fail1.cpp ]
247 # --- NumPy tests ---
249 [ numpy-test numpy/dtype ]
250 [ numpy-test numpy/ufunc ]
251 [ numpy-test numpy/templates ]
252 [ numpy-test numpy/ndarray ]
253 [ numpy-test numpy/indexing ]
254 [ numpy-test numpy/shapes ]