mirror of
https://github.com/boostorg/python.git
synced 2026-01-21 05:02:17 +00:00
* Fixed Boost.Thread jamfile to add the missing #include paths
* Modified Python testing code to use the facilities of testing.jam,
so that it can be processed with process_jam_log
* Updated Python library tests to use a test suite
* Added Python test suite to status/Jamfile
* Added --run-all-tests option to force tests to run even when up-to-date.
Also,
boost-base.jam:
Added some missing rule signatures
RUN_LD_LIBRARY_PATH became LINK_LIBPATH because it was only really
used during linking.
Reformed the movement of path variables up the dependency graph
Removed the defunct Run rule
Set up generalized constants for path manipulation
darwin-tools.jam, gcc-tools.jam:
use LINK_LIBPATH
python.jam:
Reformed the choice of Python executable
testing.jam:
Refactored testing code so it could be used for Python
Now building all environment variable setup code ahead of time
RUN_TEST became TEST_EXE
[SVN r20815]
This commit is contained in:
219
test/Jamfile
219
test/Jamfile
@@ -5,7 +5,25 @@
|
||||
subproject libs/python/test ;
|
||||
|
||||
# bring in the rules for python and testing
|
||||
import python testing ;
|
||||
import python ;
|
||||
|
||||
if [ check-python-config ]
|
||||
{
|
||||
|
||||
# A bug in the Win32 intel compilers causes compilation of one of our
|
||||
# tests to take forever when debug symbols are enabled. This rule
|
||||
# turns them off when added to the requirements section
|
||||
rule turn-off-intel-debug-symbols ( toolset variant : properties * )
|
||||
{
|
||||
if $(NT) && [ MATCH (.*intel.*) : $(toolset) ]
|
||||
{
|
||||
properties = [ difference $(properties) : <debug-symbols>on ] <debug-symbols>off ;
|
||||
}
|
||||
return $(properties) ;
|
||||
}
|
||||
|
||||
local UNIT_TEST_PROPERTIES = $(PYTHON_PROPERTIES) <define>BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION
|
||||
[ difference $(PYTHON_PROPERTIES) : <define>BOOST_PYTHON_DYNAMIC_LIB ] <define>BOOST_PYTHON_STATIC_LIB ;
|
||||
|
||||
# Convenience rule makes declaring tests faster
|
||||
rule bpl-test ( name ? : files * : requirements * )
|
||||
@@ -48,154 +66,143 @@ rule bpl-test ( name ? : files * : requirements * )
|
||||
}
|
||||
}
|
||||
|
||||
boost-python-runtest $(name) : $(py) <pyd>$(modules) ;
|
||||
return [ boost-python-runtest $(name) : $(py) <pyd>$(modules) ] ;
|
||||
}
|
||||
|
||||
run ../test/embedding.cpp <lib>../build/boost_python
|
||||
: # program args
|
||||
: # input files
|
||||
: # requirements
|
||||
$(PYTHON_PROPERTIES)
|
||||
<define>BOOST_PYTHON_STATIC_LIB
|
||||
<define>BOOST_PYTHON_STATIC_MODULE
|
||||
<library-path>$(PYTHON_LIB_PATH)
|
||||
<$(gcc-compilers)><debug-python><library-path>$(CYGWIN_PYTHON_DEBUG_DLL_PATH)
|
||||
<$(gcc-compilers)><*><library-path>$(CYGWIN_PYTHON_DLL_PATH)
|
||||
<find-library>$(PYTHON_EMBEDDED_LIBRARY) ;
|
||||
test-suite python
|
||||
: [
|
||||
run ../test/embedding.cpp <lib>../build/boost_python
|
||||
: # program args
|
||||
: # input files
|
||||
: # requirements
|
||||
$(PYTHON_PROPERTIES)
|
||||
<define>BOOST_PYTHON_STATIC_LIB
|
||||
<define>BOOST_PYTHON_STATIC_MODULE
|
||||
<library-path>$(PYTHON_LIB_PATH)
|
||||
<$(gcc-compilers)><debug-python><library-path>$(CYGWIN_PYTHON_DEBUG_DLL_PATH)
|
||||
<$(gcc-compilers)><*><library-path>$(CYGWIN_PYTHON_DLL_PATH)
|
||||
<find-library>$(PYTHON_EMBEDDED_LIBRARY)
|
||||
]
|
||||
|
||||
[
|
||||
bpl-test crossmod_exception
|
||||
: crossmod_exception.py crossmod_exception_a.cpp crossmod_exception_b.cpp
|
||||
;
|
||||
]
|
||||
|
||||
bpl-test injected ;
|
||||
bpl-test properties ;
|
||||
bpl-test return_arg ;
|
||||
bpl-test staticmethod ;
|
||||
bpl-test shared_ptr ;
|
||||
bpl-test polymorphism ;
|
||||
bpl-test auto_ptr ;
|
||||
bpl-test minimal ;
|
||||
bpl-test args ;
|
||||
bpl-test numpy ;
|
||||
bpl-test enum ;
|
||||
bpl-test exception_translator ;
|
||||
bpl-test pearu1 : test_cltree.py cltree.cpp ;
|
||||
bpl-test try : newtest.py m1.cpp m2.cpp ;
|
||||
[ bpl-test injected ]
|
||||
[ bpl-test properties ]
|
||||
[ bpl-test return_arg ]
|
||||
[ bpl-test staticmethod ]
|
||||
[ bpl-test shared_ptr ]
|
||||
[ bpl-test polymorphism ]
|
||||
[ bpl-test auto_ptr ]
|
||||
[ bpl-test minimal ]
|
||||
[ bpl-test args ]
|
||||
[ bpl-test numpy ]
|
||||
[ bpl-test enum ]
|
||||
[ bpl-test exception_translator ]
|
||||
[ bpl-test pearu1 : test_cltree.py cltree.cpp ]
|
||||
[ bpl-test try : newtest.py m1.cpp m2.cpp ]
|
||||
|
||||
bpl-test keywords : keywords.cpp keywords_test.py ;
|
||||
[ bpl-test keywords : keywords.cpp keywords_test.py ]
|
||||
|
||||
extension builtin_converters : test_builtin_converters.cpp <dll>../build/boost_python ;
|
||||
boost-python-runtest builtin_converters : test_builtin_converters.py <pyd>builtin_converters ;
|
||||
[ extension builtin_converters : test_builtin_converters.cpp <dll>../build/boost_python ]
|
||||
[ boost-python-runtest builtin_converters : test_builtin_converters.py <pyd>builtin_converters ]
|
||||
|
||||
bpl-test test_pointer_adoption ;
|
||||
bpl-test operators ;
|
||||
bpl-test callbacks ;
|
||||
bpl-test defaults ;
|
||||
[ bpl-test test_pointer_adoption ]
|
||||
[ bpl-test operators ]
|
||||
[ bpl-test callbacks ]
|
||||
[ bpl-test defaults ]
|
||||
|
||||
bpl-test object ;
|
||||
bpl-test list ;
|
||||
bpl-test long ;
|
||||
bpl-test dict ;
|
||||
bpl-test tuple ;
|
||||
bpl-test str ;
|
||||
[ bpl-test object ]
|
||||
[ bpl-test list ]
|
||||
[ bpl-test long ]
|
||||
[ bpl-test dict ]
|
||||
[ bpl-test tuple ]
|
||||
[ bpl-test str ]
|
||||
|
||||
bpl-test virtual_functions ;
|
||||
bpl-test back_reference ;
|
||||
bpl-test implicit ;
|
||||
bpl-test data_members ;
|
||||
[ bpl-test virtual_functions ]
|
||||
[ bpl-test back_reference ]
|
||||
[ bpl-test implicit ]
|
||||
[ bpl-test data_members ]
|
||||
|
||||
bpl-test ben_scott1 ;
|
||||
[ bpl-test ben_scott1 ]
|
||||
|
||||
bpl-test bienstman1 ;
|
||||
bpl-test bienstman2 ;
|
||||
bpl-test bienstman3 ;
|
||||
[ bpl-test bienstman1 ]
|
||||
[ bpl-test bienstman2 ]
|
||||
[ bpl-test bienstman3 ]
|
||||
|
||||
# A bug in the Win32 intel compilers causes compilation of one of our
|
||||
# tests to take forever when debug symbols are enabled. This rule
|
||||
# turns them off when added to the requirements section
|
||||
rule turn-off-intel-debug-symbols ( toolset variant : properties * )
|
||||
{
|
||||
if $(NT) && [ MATCH (.*intel.*) : $(toolset) ]
|
||||
{
|
||||
properties = [ difference $(properties) : <debug-symbols>on ] <debug-symbols>off ;
|
||||
}
|
||||
return $(properties) ;
|
||||
}
|
||||
|
||||
bpl-test multi_arg_constructor
|
||||
[ bpl-test multi_arg_constructor
|
||||
: # files
|
||||
: # requirements
|
||||
turn-off-intel-debug-symbols ; # debug symbols slow the build down too much
|
||||
turn-off-intel-debug-symbols ] # debug symbols slow the build down too much
|
||||
|
||||
bpl-test iterator : iterator.py iterator.cpp input_iterator.cpp ;
|
||||
[ bpl-test iterator : iterator.py iterator.cpp input_iterator.cpp ]
|
||||
|
||||
bpl-test extract ;
|
||||
[ bpl-test extract ]
|
||||
|
||||
bpl-test opaque ;
|
||||
[ bpl-test opaque ]
|
||||
|
||||
bpl-test pickle1 ;
|
||||
bpl-test pickle2 ;
|
||||
bpl-test pickle3 ;
|
||||
[ bpl-test pickle1 ]
|
||||
[ bpl-test pickle2 ]
|
||||
[ bpl-test pickle3 ]
|
||||
|
||||
bpl-test nested ;
|
||||
[ bpl-test nested ]
|
||||
|
||||
bpl-test docstring ;
|
||||
[ bpl-test docstring ]
|
||||
|
||||
bpl-test vector_indexing_suite ;
|
||||
bpl-test map_indexing_suite ;
|
||||
[ bpl-test vector_indexing_suite ]
|
||||
[ bpl-test map_indexing_suite ]
|
||||
|
||||
if $(TEST_BIENSTMAN_NON_BUGS)
|
||||
{
|
||||
bpl-test bienstman4 ;
|
||||
bpl-test bienstman5 ;
|
||||
}
|
||||
# if $(TEST_BIENSTMAN_NON_BUGS)
|
||||
# {
|
||||
# bpl-test bienstman4 ;
|
||||
# bpl-test bienstman5 ;
|
||||
# }
|
||||
|
||||
# --- unit tests of library components ---
|
||||
|
||||
local UNIT_TEST_PROPERTIES = $(PYTHON_PROPERTIES) <define>BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION
|
||||
[ difference $(PYTHON_PROPERTIES) : <define>BOOST_PYTHON_DYNAMIC_LIB ] <define>BOOST_PYTHON_STATIC_LIB ;
|
||||
[ run indirect_traits_test.cpp ]
|
||||
[ run destroy_test.cpp ]
|
||||
[ run pointer_type_id_test.cpp <lib>../../test/build/boost_test_exec_monitor : : : $(UNIT_TEST_PROPERTIES) ]
|
||||
[ run bases.cpp : : : $(UNIT_TEST_PROPERTIES) ]
|
||||
[ run if_else.cpp ]
|
||||
[ run pointee.cpp : : : $(UNIT_TEST_PROPERTIES) ]
|
||||
[ run result.cpp ]
|
||||
|
||||
run indirect_traits_test.cpp ;
|
||||
run destroy_test.cpp ;
|
||||
run pointer_type_id_test.cpp <lib>../../test/build/boost_test_exec_monitor : : : $(UNIT_TEST_PROPERTIES) ;
|
||||
run bases.cpp : : : $(UNIT_TEST_PROPERTIES) ;
|
||||
run if_else.cpp ;
|
||||
run pointee.cpp : : : $(UNIT_TEST_PROPERTIES) ;
|
||||
run result.cpp ;
|
||||
[ compile string_literal.cpp ]
|
||||
[ compile borrowed.cpp : $(UNIT_TEST_PROPERTIES) ]
|
||||
[ compile object_manager.cpp : $(UNIT_TEST_PROPERTIES) ]
|
||||
[ compile copy_ctor_mutates_rhs.cpp : $(UNIT_TEST_PROPERTIES) ]
|
||||
|
||||
compile string_literal.cpp ;
|
||||
compile borrowed.cpp : $(UNIT_TEST_PROPERTIES) ;
|
||||
compile object_manager.cpp : $(UNIT_TEST_PROPERTIES) ;
|
||||
compile copy_ctor_mutates_rhs.cpp : $(UNIT_TEST_PROPERTIES) ;
|
||||
|
||||
run upcast.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
[ run upcast.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
: # command-line args
|
||||
: # input files
|
||||
: $(UNIT_TEST_PROPERTIES)
|
||||
;
|
||||
]
|
||||
|
||||
run select_holder.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
[ run select_holder.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
: # command-line args
|
||||
: # input files
|
||||
: $(UNIT_TEST_PROPERTIES)
|
||||
;
|
||||
]
|
||||
|
||||
|
||||
run select_from_python_test.cpp ../src/converter/type_id.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
[ run select_from_python_test.cpp ../src/converter/type_id.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
: # command-line args
|
||||
: # input files
|
||||
: $(UNIT_TEST_PROPERTIES)
|
||||
;
|
||||
]
|
||||
|
||||
run select_arg_to_python_test.cpp ../src/converter/type_id.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
[ run select_arg_to_python_test.cpp ../src/converter/type_id.cpp <lib>../../test/build/boost_test_exec_monitor
|
||||
: # command-line args
|
||||
: # input files
|
||||
: $(UNIT_TEST_PROPERTIES)
|
||||
;
|
||||
|
||||
compile-fail ./raw_pyobject_fail1.cpp : $(PYTHON_PROPERTIES) ;
|
||||
compile-fail ./raw_pyobject_fail2.cpp : $(PYTHON_PROPERTIES) ;
|
||||
compile-fail ./as_to_python_function.cpp : $(PYTHON_PROPERTIES) ;
|
||||
compile-fail ./object_fail1.cpp : $(PYTHON_PROPERTIES) ;
|
||||
|
||||
]
|
||||
|
||||
[ compile-fail ./raw_pyobject_fail1.cpp : $(PYTHON_PROPERTIES) ]
|
||||
[ compile-fail ./raw_pyobject_fail2.cpp : $(PYTHON_PROPERTIES) ]
|
||||
[ compile-fail ./as_to_python_function.cpp : $(PYTHON_PROPERTIES) ]
|
||||
[ compile-fail ./object_fail1.cpp : $(PYTHON_PROPERTIES) ]
|
||||
;
|
||||
}
|
||||
Reference in New Issue
Block a user