# Copyright David Abrahams 2006. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # # To run all tests quietly: jam test # To run all tests with verbose output: jam -sPYTHON_TEST_ARGS=-v test # subproject libs/python/test ; # bring in the rules for python and 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) : on ] off ; } return $(properties) ; } # Some tests hang when compiled with HP-CXX and executed on Tru64. rule disable-for-cxx-tru64 ( toolset variant : properties * ) { if $(UNIX) && $(OS) = OSF { switch $(toolset) { case tru64cxx* : properties = [ replace-properties $(properties) : no ] ; } } return $(properties) ; } template py-unit-test : : $(PYTHON_PROPERTIES) BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION [ difference $(PYTHON_PROPERTIES) : BOOST_PYTHON_DYNAMIC_LIB ] BOOST_PYTHON_STATIC_LIB ; # Convenience rule makes declaring tests faster rule bpl-test ( name ? : files * : requirements * ) { files ?= $(name).py $(name).cpp ; local modules ; local py ; for local f in $(files) { if $(f:S) = .py { if $(py) { EXIT too many python drivers specified: "$(py)" "$(f)" ; } py = $(f) ; } } name ?= $(py:S=) ; for local f in $(files) { if $(f:S) != .py { local m = $(f:S=) ; if $(m) = $(py:S=) { m = $(name) ; if $(m) = $(py:S=) { m = $(m)_ext ; } } extension $(m) : $(f)