Jamfile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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)
  4. import python ;
  5. import os ;
  6. import ../../config/checks/config : requires ;
  7. lib socket ;
  8. use-project /boost/python : ../build ;
  9. project /boost/python/test
  10. : requirements
  11. <toolset>gcc:<cxxflags>-Wextra
  12. <target-os>qnxnto:<library>socket
  13. ;
  14. local PY = ;
  15. if [ python.configured ]
  16. {
  17. PY = /python//python ;
  18. }
  19. rule py-run ( sources * : input-file ? )
  20. {
  21. return [ run $(sources) /boost/python//boost_python $(PY)
  22. : # args
  23. : $(input-file)
  24. : #requirements
  25. <define>BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION
  26. ] ;
  27. }
  28. rule py-compile ( sources * )
  29. {
  30. return [ compile $(sources) /boost/python//boost_python ] ;
  31. }
  32. rule py-compile-fail ( sources * )
  33. {
  34. return [ compile-fail $(sources) /boost/python//boost_python ] ;
  35. }
  36. rule require-windows ( properties * )
  37. {
  38. if ! <target-os>windows in $(properties)
  39. {
  40. return <build>no ;
  41. }
  42. }
  43. if [ python.configured ]
  44. {
  45. test-suite python
  46. :
  47. [
  48. run exec.cpp /boost/python//boost_python/<link>static $(PY)
  49. : # program args
  50. : exec.py # input files
  51. : # requirements
  52. : # target-name
  53. ]
  54. [
  55. run exec.cpp ../build//boost_python/<link>shared /python//python
  56. : # program args
  57. : exec.py
  58. : # requirements
  59. : exec-dynamic # target-name
  60. ]
  61. # [
  62. # run import_.cpp ../build//boost_python /python//python
  63. # : # program args
  64. # : import_.py # input files
  65. # : # requirements
  66. # : # target-name
  67. # ]
  68. [
  69. bpl-test crossmod_exception
  70. : crossmod_exception.py crossmod_exception_a.cpp crossmod_exception_b.cpp
  71. ]
  72. [ bpl-test injected ]
  73. [ bpl-test properties ]
  74. [ bpl-test return_arg ]
  75. [ bpl-test staticmethod ]
  76. [ bpl-test boost_shared_ptr ]
  77. [ bpl-test shared_ptr
  78. : # sources
  79. : [ requires cxx11_smart_ptr ]
  80. ]
  81. [ bpl-test enable_shared_from_this ]
  82. [ bpl-test andreas_beyer ]
  83. [ bpl-test wrapper_held_type ]
  84. [ bpl-test polymorphism2_auto_ptr
  85. : polymorphism2_auto_ptr.py polymorphism2.py polymorphism2_auto_ptr.cpp
  86. : [ requires auto_ptr ]
  87. ]
  88. [ bpl-test polymorphism ]
  89. [ bpl-test polymorphism2 ]
  90. [ bpl-test auto_ptr
  91. : # files
  92. : [ requires auto_ptr ]
  93. ]
  94. [ bpl-test minimal ]
  95. [ bpl-test args ]
  96. [ bpl-test raw_ctor ]
  97. [ bpl-test enum : test_enum.py enum_ext.cpp ]
  98. [ bpl-test exception_translator ]
  99. [ bpl-test pearu1 : test_cltree.py cltree.cpp ]
  100. [ bpl-test try : newtest.py m1.cpp m2.cpp ]
  101. [ bpl-test const_argument ]
  102. [ bpl-test keywords : keywords.cpp keywords_test.py ]
  103. [ python-extension builtin_converters_ext : builtin_converters.cpp /boost/python//boost_python ]
  104. [ bpl-test builtin_converters : test_builtin_converters.py builtin_converters_ext ]
  105. [ bpl-test test_pointer_adoption ]
  106. [ bpl-test operators ]
  107. [ bpl-test operators_wrapper ]
  108. [ bpl-test callbacks ]
  109. [ bpl-test defaults ]
  110. [ bpl-test object ]
  111. [ bpl-test class ]
  112. [ bpl-test list ]
  113. [ bpl-test long ]
  114. [ bpl-test dict ]
  115. [ bpl-test tuple ]
  116. [ bpl-test str ]
  117. [ bpl-test slice ]
  118. [ bpl-test virtual_functions ]
  119. [ bpl-test back_reference ]
  120. [ bpl-test implicit ]
  121. [ bpl-test data_members ]
  122. [ bpl-test ben_scott1 ]
  123. [ bpl-test bienstman1 ]
  124. [ bpl-test bienstman2 ]
  125. [ bpl-test bienstman3 ]
  126. [ bpl-test multi_arg_constructor
  127. : # files
  128. : # requirements
  129. # A bug in the Win32 intel compilers causes compilation of one of our
  130. # tests to take forever when debug symbols are enabled. This rule
  131. # turns them off when added to the requirements section
  132. <toolset>intel-win:<debug-symbols>off
  133. ]
  134. [ bpl-test iterator : iterator.py iterator.cpp input_iterator.cpp ]
  135. [ bpl-test stl_iterator : stl_iterator.py stl_iterator.cpp ]
  136. [ bpl-test extract ]
  137. [
  138. bpl-test crossmod_opaque
  139. : crossmod_opaque.py crossmod_opaque_a.cpp crossmod_opaque_b.cpp
  140. ]
  141. [ bpl-test opaque ]
  142. [ bpl-test voidptr ]
  143. [ bpl-test pickle1 ]
  144. [ bpl-test pickle2 ]
  145. [ bpl-test pickle3 ]
  146. [ bpl-test pickle4 ]
  147. [ bpl-test nested ]
  148. [ bpl-test docstring ]
  149. [ bpl-test pytype_function ]
  150. [ bpl-test vector_indexing_suite ]
  151. [ bpl-test pointer_vector
  152. : # files
  153. : # requirements
  154. # Turn off this test on HP CXX, as the test hangs when executing.
  155. # Whenever the cause for the failure of the polymorphism test is found
  156. # and fixed, this should be retested.
  157. <toolset>hp_cxx:<build>no ]
  158. [ python-extension map_indexing_suite_ext
  159. : map_indexing_suite.cpp int_map_indexing_suite.cpp a_map_indexing_suite.cpp
  160. /boost/python//boost_python ]
  161. [ bpl-test
  162. map_indexing_suite : map_indexing_suite.py map_indexing_suite_ext ]
  163. [ run import_.cpp /boost/python//boost_python $(PY) : : import_.py ]
  164. # if $(TEST_BIENSTMAN_NON_BUGS)
  165. # {
  166. # bpl-test bienstman4 ;
  167. # bpl-test bienstman5 ;
  168. # }
  169. [ bpl-test calling_conventions : : <conditional>@require-windows ]
  170. [ bpl-test calling_conventions_mf : : <conditional>@require-windows ]
  171. # --- unit tests of library components ---
  172. [ compile indirect_traits_test.cpp ]
  173. [ run destroy_test.cpp ]
  174. [ py-run pointer_type_id_test.cpp ]
  175. [ py-run bases.cpp ]
  176. [ run if_else.cpp ]
  177. [ py-run pointee.cpp ]
  178. [ run result.cpp ]
  179. [ compile string_literal.cpp ]
  180. [ py-compile borrowed.cpp ]
  181. [ py-compile object_manager.cpp ]
  182. [ py-compile copy_ctor_mutates_rhs.cpp ]
  183. [ py-run upcast.cpp ]
  184. [ py-compile select_holder.cpp ]
  185. [ run select_from_python_test.cpp ../src/converter/type_id.cpp
  186. :
  187. :
  188. : <define>BOOST_PYTHON_STATIC_LIB
  189. <use>$(PY)
  190. ]
  191. [ py-compile select_arg_to_python_test.cpp ]
  192. [ py-compile-fail ./raw_pyobject_fail1.cpp ]
  193. [ py-compile-fail ./raw_pyobject_fail2.cpp ]
  194. [ py-compile-fail ./as_to_python_function.cpp ]
  195. [ py-compile-fail ./object_fail1.cpp ]
  196. # --- NumPy tests ---
  197. [ numpy-test numpy/dtype ]
  198. [ numpy-test numpy/ufunc ]
  199. [ numpy-test numpy/templates ]
  200. [ numpy-test numpy/ndarray ]
  201. [ numpy-test numpy/indexing ]
  202. [ numpy-test numpy/shapes ]
  203. ;
  204. }