77# (See accompanying file LICENSE_1_0.txt or copy at
88# http://www.boost.org/LICENSE_1_0.txt)
99
10+ import platform
11+
1012Import ('env' )
1113
1214# libs needed for embedding
1315ELIBS = env ['LIBS' ] + env ['PYTHONLIBS' ]
1416
15- def BPLTest (env , name , sources = None , script = None ):
17+ def BPLTest (env , name , sources = None , deps = None ):
1618 run = env .BoostRunPythonScript (name + '.py' )
1719 if sources :
1820 for source in sources :
@@ -21,6 +23,8 @@ def BPLTest(env, name, sources = None, script = None):
2123 )
2224 else :
2325 Depends (run , env .PythonExtension (name + '_ext' , name + '.cpp' ))
26+ if deps :
27+ Depends (run , deps )
2428 return run
2529
2630env .AddMethod (BPLTest )
@@ -30,83 +34,81 @@ env.AppendENVPath('PYTHONPATH', Dir('.').path)
3034tests = []
3135tests += env .BPLTest ('crossmod_exception' , ['crossmod_exception_a' , 'crossmod_exception_b' ])
3236
33- for test in ['injected' ,
34- 'properties' ,
35- 'return_arg' ,
36- 'staticmethod' ,
37- 'shared_ptr' ,
38- 'enable_shared_from_this' ,
39- 'andreas_beyer' ,
40- 'polymorphism' ,
41- 'polymorphism2' ,
42- 'wrapper_held_type' ,
43- 'polymorphism2_auto_ptr' ,
44- 'auto_ptr' ,
45- 'minimal' ,
46- 'args' ,
47- 'raw_ctor' ,
48- #'numpy',
49- 'exception_translator' ]:
50- tests += env .BPLTest (test )
51-
52- tests += env .BPLTest ('test_enum' , ['enum_ext' ])
53- tests += env .BPLTest ('test_cltree' , ['cltree' ])
54- tests += env .BPLTest ('newtest' , ['m1' , 'm2' ])
55- tests += env .BPLTest ('const_argument' )
56- tests += env .BPLTest ('keywords_test' , ['keywords' ])
37+ for test in [('injected' ,),
38+ ('properties' ,),
39+ ('return_arg' ,),
40+ ('staticmethod' ,),
41+ ('shared_ptr' ,),
42+ ('enable_shared_from_this' ,),
43+ ('andreas_beyer' ,),
44+ ('polymorphism' ,),
45+ ('polymorphism2' ,),
46+ ('wrapper_held_type' ,),
47+ ('polymorphism2_auto_ptr' ,),
48+ ('auto_ptr' ,),
49+ ('minimal' ,),
50+ ('args' ,),
51+ ('raw_ctor' ,),
52+ ('numpy' ,None , ['printer.py' , 'numeric_tests.py' , 'numarray_tests.py' ]),
53+ ('exception_translator' ,),
54+ ('test_enum' , ['enum_ext' ]),
55+ ('test_cltree' , ['cltree' ]),
56+ ('newtest' , ['m1' , 'm2' ]),
57+ ('const_argument' ,),
58+ ('keywords_test' , ['keywords' ]),
59+ ('test_pointer_adoption' ,),
60+ ('operators' ,),
61+ ('operators_wrapper' ,),
62+ ('callbacks' ,),
63+ ('defaults' ,),
64+ ('object' ,),
65+ ('list' ,),
66+ ('long' ,),
67+ ('dict' ,),
68+ ('tuple' ,),
69+ ('str' ,),
70+ ('slice' ,),
71+ ('virtual_functions' ,),
72+ ('back_reference' ,),
73+ ('implicit' ,),
74+ ('data_members' ,),
75+ ('ben_scott1' ,),
76+ ('bienstman1' ,),
77+ ('bienstman2' ,),
78+ ('bienstman3' ,),
79+ ('multi_arg_constructor' ,),
80+ ('iterator' , ['iterator' , 'input_iterator' ]),
81+ ('stl_iterator' ,),
82+ ('extract' ,),
83+ ('crossmod_opaque' , ['crossmod_opaque_a' , 'crossmod_opaque_b' ]),
84+ ('opaque' ,),
85+ ('voidptr' ,),
86+ ('pickle1' ,),
87+ ('pickle2' ,),
88+ ('pickle3' ,),
89+ ('pickle4' ,),
90+ ('nested' ,),
91+ ('docstring' ,),
92+ ('pytype_function' ,),
93+ ('vector_indexing_suite' ,),
94+ ('pointer_vector' ,)]:
95+ tests += env .BPLTest (* test )
96+
97+ test = env .BoostRunPythonScript ('test_builtin_converters.py' )
5798Depends (
58- env . BoostRunPythonScript ( 'test_builtin_converters.py' ) ,
59- env .PythonExtension ('builtin_converters_ext' , 'test_builtin_converters.cpp' )
99+ test ,
100+ env .PythonExtension ('builtin_converters_ext' , [ 'test_builtin_converters.cpp' ] )
60101 )
61-
62- for test in ['test_pointer_adoption' ,
63- 'operators' ,
64- 'operators_wrapper' ,
65- 'callbacks' ,
66- 'defaults' ,
67- 'object' ,
68- 'list' ,
69- 'long' ,
70- 'dict' ,
71- 'tuple' ,
72- 'str' ,
73- 'slice' ,
74- 'virtual_functions' ,
75- 'back_reference' ,
76- 'implicit' ,
77- 'data_members' ,
78- 'ben_scott1' ,
79- 'bienstman1' ,
80- 'bienstman2' ,
81- 'bienstman3' ,
82- 'multi_arg_constructor' ]:
83- tests += env .BPLTest (test )
84-
85- tests += env .BPLTest ('iterator' , ['iterator' , 'input_iterator' ])
86- tests += env .BPLTest ('stl_iterator' )
87- tests += env .BPLTest ('extract' )
88- tests += env .BPLTest ('crossmod_opaque' , ['crossmod_opaque_a' , 'crossmod_opaque_b' ])
89-
90- for test in ['opaque' ,
91- 'voidptr' ,
92- 'pickle1' ,
93- 'pickle2' ,
94- 'pickle3' ,
95- 'pickle4' ,
96- 'nested' ,
97- 'docstring' ,
98- 'pytype_function' ,
99- 'vector_indexing_suite' ,
100- 'pointer_vector' ]:
101- tests += env .BPLTest (test )
102-
102+ tests += test
103+ test = env .BoostRunPythonScript ('map_indexing_suite.py' )
103104Depends (
104- env . BoostRunPythonScript ( 'map_indexing_suite.py' ) ,
105+ test ,
105106 env .PythonExtension ('map_indexing_suite_ext' , [
106107 'map_indexing_suite.cpp' ,
107108 'int_map_indexing_suite.cpp' ,
108109 'a_map_indexing_suite.cpp' ])
109110 )
111+ tests += test
110112
111113tests += env .BoostRunTest ('import_' , 'import_.cpp' , '${SOURCES[0]} ${SOURCES[1]}' , 'import_.py' , LIBS = ELIBS )
112114
@@ -128,5 +130,9 @@ tests+=env.BoostCompileTest('select_holder')
128130tests += env .BoostRunTest ('select_from_python_test' , LIBS = ELIBS )
129131tests += env .BoostCompileTest ('select_arg_to_python_test' )
130132
133+ if platform .system () == 'Windows' :
134+ tests += env .BPLTest ('calling_conventions' )
135+ tests += env .BPLTest ('calling_conventions_mf' )
136+
131137env .BoostTestSummary (tests )
132138AlwaysBuild (tests )
0 commit comments