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)
57 run exec.cpp /boost/python//boost_python/<link>static $(PY)
59 : exec.py # input files
65 run exec.cpp ../build//boost_python/<link>shared /python//python
69 : exec-dynamic # target-name
73 # run import_.cpp ../build//boost_python /python//python
75 # : import_.py # input files
81 bpl-test crossmod_exception
82 : crossmod_exception.py crossmod_exception_a.cpp crossmod_exception_b.cpp
86 [ bpl-test properties ]
87 [ bpl-test return_arg ]
88 [ bpl-test staticmethod ]
89 [ bpl-test boost_shared_ptr ]
92 : [ requires cxx11_smart_ptr ]
94 [ bpl-test enable_shared_from_this ]
95 [ bpl-test andreas_beyer ]
96 [ bpl-test wrapper_held_type ]
98 [ bpl-test polymorphism2_auto_ptr
99 : polymorphism2_auto_ptr.py polymorphism2.py polymorphism2_auto_ptr.cpp
102 [ bpl-test polymorphism ]
103 [ bpl-test polymorphism2 ]
105 [ bpl-test auto_ptr ]
109 [ bpl-test raw_ctor ]
110 [ bpl-test enum : test_enum.py enum_ext.cpp ]
111 [ bpl-test exception_translator ]
112 [ bpl-test pearu1 : test_cltree.py cltree.cpp ]
113 [ bpl-test try : newtest.py m1.cpp m2.cpp ]
114 [ bpl-test const_argument ]
115 [ bpl-test keywords : keywords.cpp keywords_test.py ]
118 [ python-extension builtin_converters_ext : builtin_converters.cpp /boost/python//boost_python ]
119 [ bpl-test builtin_converters : test_builtin_converters.py builtin_converters_ext ]
121 [ bpl-test test_pointer_adoption ]
122 [ bpl-test operators ]
123 [ bpl-test operators_wrapper ]
124 [ bpl-test callbacks ]
125 [ bpl-test defaults ]
136 [ bpl-test virtual_functions ]
137 [ bpl-test back_reference ]
138 [ bpl-test implicit ]
139 [ bpl-test data_members ]
141 [ bpl-test ben_scott1 ]
143 [ bpl-test bienstman1 ]
144 [ bpl-test bienstman2 ]
145 [ bpl-test bienstman3 ]
147 [ bpl-test multi_arg_constructor
150 # A bug in the Win32 intel compilers causes compilation of one of our
151 # tests to take forever when debug symbols are enabled. This rule
152 # turns them off when added to the requirements section
153 <toolset>intel-win:<debug-symbols>off
156 [ bpl-test iterator : iterator.py iterator.cpp input_iterator.cpp ]
158 [ bpl-test stl_iterator : stl_iterator.py stl_iterator.cpp ]
163 bpl-test crossmod_opaque
164 : crossmod_opaque.py crossmod_opaque_a.cpp crossmod_opaque_b.cpp
176 [ bpl-test docstring ]
177 [ bpl-test pytype_function ]
179 [ bpl-test vector_indexing_suite ]
181 [ bpl-test pointer_vector
184 # Turn off this test on HP CXX, as the test hangs when executing.
185 # Whenever the cause for the failure of the polymorphism test is found
186 # and fixed, this should be retested.
187 <toolset>hp_cxx:<build>no ]
189 [ python-extension map_indexing_suite_ext
190 : map_indexing_suite.cpp int_map_indexing_suite.cpp a_map_indexing_suite.cpp
191 /boost/python//boost_python ]
193 map_indexing_suite : map_indexing_suite.py map_indexing_suite_ext ]
195 [ run import_.cpp /boost/python//boost_python $(PY) : : import_.py ]
197 # if $(TEST_BIENSTMAN_NON_BUGS)
199 # bpl-test bienstman4 ;
200 # bpl-test bienstman5 ;
203 [ bpl-test calling_conventions : : <conditional>@require-windows ]
204 [ bpl-test calling_conventions_mf : : <conditional>@require-windows ]
206 # --- unit tests of library components ---
208 [ compile indirect_traits_test.cpp ]
209 [ run destroy_test.cpp ]
210 [ py-run pointer_type_id_test.cpp ]
213 [ py-run pointee.cpp ]
216 [ compile string_literal.cpp ]
217 [ py-compile borrowed.cpp ]
218 [ py-compile object_manager.cpp ]
219 [ py-compile copy_ctor_mutates_rhs.cpp ]
221 [ py-run upcast.cpp ]
223 [ py-compile select_holder.cpp ]
225 [ run select_from_python_test.cpp ../src/converter/type_id.cpp
228 : <define>BOOST_PYTHON_STATIC_LIB
233 [ py-compile select_arg_to_python_test.cpp ]
235 [ py-compile-fail ./raw_pyobject_fail1.cpp ]
236 [ py-compile-fail ./raw_pyobject_fail2.cpp ]
237 [ py-compile-fail ./as_to_python_function.cpp ]
238 [ py-compile-fail ./object_fail1.cpp ]
240 # --- NumPy tests ---
242 [ numpy-test numpy/dtype ]
243 [ numpy-test numpy/ufunc ]
244 [ numpy-test numpy/templates ]
245 [ numpy-test numpy/ndarray ]
246 [ numpy-test numpy/indexing ]
247 [ numpy-test numpy/shapes ]