diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 5b6486c..6a24bd4 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,7 +1,7 @@ # Boost System Library test Jamfile # Copyright Beman Dawes 2003, 2006 -# Copyright 2017, 2018 Peter Dimov +# Copyright 2017-2019 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt @@ -9,113 +9,37 @@ # See library home page at http://www.boost.org/libs/system import testing ; -import os ; -project - : requirements - /boost/system//boost_system - ; +lib throw_test : throw_test.cpp : shared:THROW_DYN_LINK=1 ; - lib throw_test : throw_test.cpp : shared:THROW_DYN_LINK=1 ; +lib single_instance_lib1 : single_instance_1.cpp : shared:SINGLE_INSTANCE_DYN_LINK ; +lib single_instance_lib2 : single_instance_2.cpp : shared:SINGLE_INSTANCE_DYN_LINK ; - lib single_instance_lib1 : single_instance_1.cpp : shared:SINGLE_INSTANCE_DYN_LINK ; - lib single_instance_lib2 : single_instance_2.cpp : shared:SINGLE_INSTANCE_DYN_LINK ; - - rule cxx03 ( properties * ) - { - local result ; - - if gcc in $(properties) - { - result = -std=c++98 ; # 4.4 has no 03 - } - else if clang in $(properties) - { - result = -std=c++03 ; - } - else - { - result = no ; - } - - return $(result) ; - } - - rule cxx11 ( properties * ) - { - local result ; - - if gcc in $(properties) - { - result = -std=c++0x ; # 4.6 has no 11 - } - else if clang in $(properties) - { - result = -std=c++11 ; - } - else - { - result = no ; - } - - return $(result) ; - } - - rule system-run- ( sources + ) - { - local result ; - - result += [ run $(sources) : : : static : $(sources[1]:B)_static ] ; - result += [ run $(sources) : : : shared : $(sources[1]:B)_shared ] ; - result += [ run $(sources) : : : -/boost/system//boost_system BOOST_ERROR_CODE_HEADER_ONLY : $(sources[1]:B)_header ] ; - - return $(result) ; - } - -if [ os.environ UBSAN ] +rule system-run ( sources + ) { - rule system-run ( sources + ) - { - # The 03/11 tests are ODR violations, no point running them under -fsanitize=undefined - return [ system-run- $(sources) ] ; - } -} -else -{ - rule system-run ( sources + ) - { - local result = [ system-run- $(sources) ] ; + local result ; - # Test a source file built with -std=c++03 linked with a System library built without -std=c++03 - result += [ run $(sources) : : : static @cxx03 : $(sources[1]:B)_static_03 ] ; - result += [ run $(sources) : : : shared @cxx03 : $(sources[1]:B)_shared_03 ] ; + result += [ run $(sources) ] ; + result += [ run $(sources) : : : /boost/system//boost_system static : $(sources[1]:B)_static ] ; + result += [ run $(sources) : : : /boost/system//boost_system shared : $(sources[1]:B)_shared ] ; + result += [ run $(sources) : : : BOOST_NO_ANSI_APIS : $(sources[1]:B)_no_ansi ] ; + result += [ run $(sources) : : : BOOST_SYSTEM_USE_UTF8 : $(sources[1]:B)_utf8 ] ; - # Test a source file built with -std=c++11 linked with a System library built without -std=c++11 - result += [ run $(sources) : : : static @cxx11 : $(sources[1]:B)_static_11 ] ; - result += [ run $(sources) : : : shared @cxx11 : $(sources[1]:B)_shared_11 ] ; - - return $(result) ; - } + return $(result) ; } system-run error_code_test.cpp ; system-run error_code_user_test.cpp ; system-run system_error_test.cpp ; -run dynamic_link_test.cpp throw_test : : : shared : throw_test_shared ; +run dynamic_link_test.cpp throw_test : : : shared : throw_test_shared ; system-run initialization_test.cpp ; - -run header_only_test.cpp : : : -/boost/system//boost_system ; -run header_only_test.cpp : : : -/boost/system//boost_system BOOST_NO_ANSI_APIS : header_only_test_no_ansi ; -run header_only_test.cpp : : : -/boost/system//boost_system BOOST_SYSTEM_USE_UTF8 : header_only_test_utf8 ; - -run error_code_test.cpp : : : -/boost/system//boost_system BOOST_ERROR_CODE_HEADER_ONLY BOOST_NO_ANSI_APIS : error_code_test_no_ansi ; -run error_code_test.cpp : : : -/boost/system//boost_system BOOST_ERROR_CODE_HEADER_ONLY BOOST_SYSTEM_USE_UTF8 : error_code_test_utf8 ; +system-run header_only_test.cpp ; run config_test.cpp : : : always_show_run_output ; -system-run- std_interop_test.cpp ; +system-run std_interop_test.cpp ; system-run std_mismatch_test.cpp ; system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ; @@ -124,7 +48,7 @@ run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : :