# (C) Copyright Gennadiy Rozental 2001-2015. # Use, modification, and distribution are subject to 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) # # See http://www.boost.org/libs/test for the library home page. import path ; import ../../config/checks/config : requires ; project : requirements ; local check_msg = "Boost.Test feature check: " ; # documentation requirements: we use new style examples in the doc and compile on compilers supporting that requirements_documentation = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros cxx11_template_aliases ] ; # requirements for BOOST_TEST feature, full extension requirements_boost_test_full_support = [ requires cxx11_variadic_macros cxx11_decltype cxx11_auto_declarations ] ; # requirements_boost_test_full_support += [ check-target-builds ../tools/check_boost_test_support.cpp "Boost.Test feature check: BOOST_TEST full support" : : no ] ; # requirements for dataset feature requirements_datasets = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros cxx11_trailing_result_types cxx11_template_aliases ] ; #_________________________________________________________________________________________________# # lib gcov : : gcov : ; rule boost.test-self-test ( test-rule : test-suite : test-name : usage-variant ? : pattern_file * : source_files * : extra-libs ? : extra-options ? : requirements * ) { source_files ?= $(test-suite)/$(test-name).cpp ; usage-variant ?= boost_unit_test_framework/static ; return [ $(test-rule) $(source_files) ../build//$(usage-variant) $(extra-libs) # gcov : -- "" #args : $(pattern_file) : # Activating -pedantic finds more gotchas # Unfortunately, this warns about the use of "long long" in gcc's own stdlib # So deactivate those warnings again gcc:-pedantic gcc:-Wno-long-long gcc:-Wno-variadic-macros clang:-Wno-c99-extensions clang:-Wno-variadic-macros # gcc:--coverage all $(extra-options) $(requirements) : $(test-name) ] ; } #_________________________________________________________________________________________________# rule boost.test-mt-test ( test-rule : test-suite : test-name : usage-variant ? : pattern_file * : source_files * : extra-libs ? ) { return [ boost.test-self-test $(test-rule) : $(test-suite) : $(test-name) : $(usage-variant) : $(pattern_file) : $(source_files) : $(extra-libs) : multi ] ; } #_________________________________________________________________________________________________# rule docs-example-as-test ( test-file ) { test-file-name = [ path.basename $(test-file) ] ; test-name-rule = [ MATCH (.+)\\.(.+)\\.cpp : $(test-file-name) ] ; return [ boost.test-self-test $(test-name-rule[2]) : ../doc/examples : doc-$(test-name-rule[1]) : included : : $(test-file) : : : $(requirements_documentation) # requirements ] ; } #_________________________________________________________________________________________________# test-suite "utils-ts" : [ boost.test-self-test run : utils-ts : algorithm-test ] [ boost.test-self-test run : utils-ts : basic_cstring-test ] [ boost.test-self-test run : utils-ts : class_properties-test ] [ boost.test-self-test run : utils-ts : foreach-test ] [ boost.test-self-test run : utils-ts : named_params-test ] [ boost.test-self-test run : utils-ts : runtime-param-test : : : : : : [ requires cxx11_auto_declarations cxx11_function_template_default_args cxx11_lambdas cxx11_hdr_initializer_list cxx11_template_aliases ] ] [ boost.test-self-test run : utils-ts : string_cast-test ] [ boost.test-self-test run : utils-ts : token_iterator-test ] ; #_________________________________________________________________________________________________# test-suite "usage-variants-ts" : [ boost.test-self-test run : usage-variants-ts : single-header-test : included ] [ boost.test-self-test run : usage-variants-ts : single-header-custom-init-test : included ] [ boost.test-self-test run : usage-variants-ts : single-header-custom-main-test : included ] [ boost.test-self-test run : usage-variants-ts : static-library-test ] [ boost.test-self-test run : usage-variants-ts : static-library-custom-init-test ] [ boost.test-self-test run : usage-variants-ts : shared-library-test : boost_unit_test_framework/shared ] [ boost.test-self-test run : usage-variants-ts : shared-library-custom-init-test : boost_unit_test_framework/shared ] [ boost.test-self-test run : usage-variants-ts : shared-library-custom-main-test : boost_unit_test_framework/shared ] ; #_________________________________________________________________________________________________# test-suite "framework-ts" : [ boost.test-self-test run : framework-ts : result-report-test : : baseline-outputs/result-report-test.pattern ] [ boost.test-self-test run : framework-ts : log-formatter-test : : baseline-outputs/log-formatter-test.pattern ] [ boost.test-self-test run : framework-ts : run-by-name-or-label-test ] ; #_________________________________________________________________________________________________# test-suite "writing-test-ts" : [ boost.test-self-test run : writing-test-ts : assertion-construction-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx11_trailing_result_types cxx11_nullptr ] ] [ boost.test-self-test run : writing-test-ts : boost_check_equal-str-test ] [ boost.test-self-test run : writing-test-ts : collection-comparison-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx11_unified_initialization_syntax ] ] # required by the test content [ boost.test-self-test run : writing-test-ts : dont_print_log_value-test : : : : : : $(requirements_datasets) ] [ boost.test-self-test run : writing-test-ts : fp-comparisons-test : : : : : : $(requirements_boost_test_full_support) ] [ boost.test-self-test run : writing-test-ts : fp-multiprecision-comparison-test : : : : : : $(requirements_boost_test_full_support) ] [ boost.test-self-test run : writing-test-ts : output_test_stream-test ] [ boost.test-self-test run : writing-test-ts : test_tools-test : : baseline-outputs/test_tools-test.pattern : : : : $(requirements_boost_test_full_support) ] [ boost.test-self-test run : writing-test-ts : windows-headers-test ] [ boost.test-self-test run : writing-test-ts : tools-under-debugger-test ] [ boost.test-self-test run : writing-test-ts : tools-debuggable-test : : : : : : $(requirements_boost_test_full_support) ] [ boost.test-self-test run : writing-test-ts : test-dataset-over-tuples : : : : : : $(requirements_datasets) ] ; #_________________________________________________________________________________________________# test-suite "test-organization-ts" : [ boost.test-self-test run : test-organization-ts : parameterized_test-test ] [ boost.test-self-test run : test-organization-ts : test_case_template-test ] [ boost.test-self-test run : test-organization-ts : datasets-test : : : [ glob test-organization-ts/datasets-test/*.cpp ] : : : $(requirements_datasets) ] [ boost.test-self-test run : test-organization-ts : dataset-variadic_and_move_semantic-test : : : : : : $(requirements_datasets) ] [ boost.test-self-test run : test-organization-ts : test_unit-order-test ] [ boost.test-self-test run : test-organization-ts : test_unit-order-shuffled-test : : : : : : $(requirements_boost_test_full_support) ] [ boost.test-self-test run : test-organization-ts : test-tree-management-test ] ; #_________________________________________________________________________________________________# test-suite "multithreading-ts" : [ boost.test-mt-test run : multithreading-ts : sync-access-test : : : : /boost/thread//boost_thread/static ] ; #_________________________________________________________________________________________________# test-suite "prg_exec_monitor-ts" : [ boost.test-self-test run-fail : prg_exec_monitor-ts : result-code-test : boost_prg_exec_monitor/static ] [ boost.test-self-test run-fail : prg_exec_monitor-ts : system-exception-test : boost_prg_exec_monitor/static ] [ boost.test-self-test run-fail : prg_exec_monitor-ts : uncatched-exception-test : included ] [ boost.test-self-test run-fail : prg_exec_monitor-ts : user-fatal-exception-test : boost_prg_exec_monitor/static ] ; #_________________________________________________________________________________________________# test-suite "execution_monitor-ts" : [ boost.test-self-test run : execution_monitor-ts : errors-handling-test : : baseline-outputs/errors-handling-test.pattern baseline-outputs/errors-handling-test.pattern2 ] [ boost.test-self-test run : execution_monitor-ts : custom-exception-test ] ; #_________________________________________________________________________________________________# import sequence ; test-suite "doc-examples-ts" : [ sequence.transform docs-example-as-test : [ glob ../doc/examples/*.cpp ] ] ; #_________________________________________________________________________________________________# # A target that runs all the tests alias test : utils-ts usage-variants-ts framework-ts writing-test-ts test-organization-ts multithreading-ts prg_exec_monitor-ts execution_monitor-ts doc-examples-ts ; #_________________________________________________________________________________________________# # EOF