2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-26 04:52:38 +00:00
Files
test/test/Jamfile.v2

210 lines
9.3 KiB
Plaintext

# (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 ] ;
# 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" : : <build>no ] ;
# requirements for dataset feature
requirements_datasets = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros ] ;
#_________________________________________________________________________________________________#
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/<link>static ;
return [ $(test-rule) $(source_files) ../build//$(usage-variant) $(extra-libs)
: #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
<toolset>gcc:<cxxflags>-pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
<toolset>gcc:<cxxflags>-Wno-variadic-macros
<toolset>clang:<cxxflags>-Wno-c99-extensions
<warnings>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)
: <threading>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 : config_file-test ]
# [ boost.test-self-test run : utils-ts : config_file_iterator-test ]
[ boost.test-self-test run : utils-ts : fixed_mapping-test ]
[ boost.test-self-test run : utils-ts : foreach-test ]
[ boost.test-self-test run : utils-ts : ifstream_line_iterator-test : : inputs/ifstream_line_iterator.tst1
inputs/ifstream_line_iterator.tst2 ]
[ 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/<link>shared ]
[ boost.test-self-test run : usage-variants-ts : shared-library-custom-init-test : boost_unit_test_framework/<link>shared ]
[ boost.test-self-test run : usage-variants-ts : shared-library-custom-main-test : boost_unit_test_framework/<link>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 : 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) ]
[ boost.test-self-test run : writing-test-ts : boost_check_equal-str-test ]
[ boost.test-self-test run : writing-test-ts : collection-comparison-test : : : : : : [ requires cxx11_auto_declarations cxx11_decltype ] ] # 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) ]
;
#_________________________________________________________________________________________________#
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 : test_unit-order-test ]
[ 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/<link>static ]
;
#_________________________________________________________________________________________________#
test-suite "prg_exec_monitor-ts"
:
[ boost.test-self-test run-fail : prg_exec_monitor-ts : result-code-test : boost_prg_exec_monitor/<link>static ]
[ boost.test-self-test run-fail : prg_exec_monitor-ts : system-exception-test : boost_prg_exec_monitor/<link>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/<link>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