Skip to content

Commit d033264

Browse files
authored
Merge pull request #463 from boostorg/develop
Merge to Master for 1.90
2 parents cfd3a7e + 1c2ab97 commit d033264

10 files changed

Lines changed: 241 additions & 174 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,22 @@ jobs:
7676
- toolset: gcc-9
7777
cxxstd: "17,2a"
7878
address_model: 64
79-
os: ubuntu-20.04
79+
os: ubuntu-latest
80+
container: ubuntu:20.04
8081
install:
8182
- g++-9-multilib
8283
- toolset: gcc-9
8384
cxxstd: "17-gnu,2a-gnu"
8485
address_model: 64
85-
os: ubuntu-20.04
86+
os: ubuntu-latest
87+
container: ubuntu:20.04
8688
install:
8789
- g++-9-multilib
8890
- toolset: gcc-10
8991
cxxstd: "17,20"
9092
address_model: 64
91-
os: ubuntu-20.04
93+
os: ubuntu-latest
94+
container: ubuntu:20.04
9295
install:
9396
- g++-10-multilib
9497
- toolset: gcc-11
@@ -110,13 +113,13 @@ jobs:
110113
install:
111114
- g++-12-multilib
112115
- name: UBSAN
113-
toolset: gcc-12
114-
cxxstd: "17"
116+
toolset: gcc-13
117+
cxxstd: "11"
115118
address_model: 64
116119
ubsan: 1
117-
os: ubuntu-22.04
120+
os: ubuntu-24.04
118121
install:
119-
- g++-12-multilib
122+
- g++-13-multilib
120123

121124
# Linux, clang
122125
- toolset: clang
@@ -174,13 +177,15 @@ jobs:
174177
- toolset: clang
175178
compiler: clang++-9
176179
cxxstd: "17,2a"
177-
os: ubuntu-20.04
180+
os: ubuntu-latest
181+
container: ubuntu:20.04
178182
install:
179183
- clang-9
180184
- toolset: clang
181185
compiler: clang++-10
182186
cxxstd: "17,20"
183-
os: ubuntu-20.04
187+
os: ubuntu-latest
188+
container: ubuntu:20.04
184189
install:
185190
- clang-10
186191
- toolset: clang
@@ -252,10 +257,10 @@ jobs:
252257

253258
- toolset: clang
254259
cxxstd: "20"
255-
os: macos-13
260+
os: macos-14
256261
- toolset: clang
257262
cxxstd: "20"
258-
os: macos-14
263+
os: macos-15
259264

260265
runs-on: ${{matrix.os}}
261266
container:
@@ -468,14 +473,6 @@ jobs:
468473
fail-fast: false
469474
matrix:
470475
include:
471-
- toolset: msvc-14.0
472-
cxxstd: "11"
473-
addrmd: 64
474-
os: windows-2019
475-
- toolset: msvc-14.2
476-
cxxstd: "14"
477-
addrmd: 64
478-
os: windows-2019
479476
- toolset: msvc-14.3
480477
cxxstd: "20"
481478
addrmd: 64
@@ -487,7 +484,7 @@ jobs:
487484
- toolset: gcc
488485
cxxstd: "17"
489486
addrmd: 64
490-
os: windows-2019
487+
os: windows-2022
491488

492489
runs-on: ${{matrix.os}}
493490

@@ -531,10 +528,10 @@ jobs:
531528
fail-fast: false
532529
matrix:
533530
include:
534-
- { os: ubuntu-20.04, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' }
535-
- { os: ubuntu-20.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
536-
- { os: windows-2019, build_shared: ON, build_type: Debug, generator: 'Visual Studio 16 2019' }
537-
- { os: windows-2019, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 16 2019' }
531+
- { os: ubuntu-22.04, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' }
532+
- { os: ubuntu-22.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
533+
- { os: windows-2025, build_shared: ON, build_type: Debug, generator: 'Visual Studio 17 2022' }
534+
- { os: windows-2025, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 17 2022' }
538535

539536
timeout-minutes: 120
540537
runs-on: ${{matrix.os}}

CMakeLists.txt

Lines changed: 61 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Distributed under the Boost Software License, Version 1.0.
33
# https://www.boost.org/LICENSE_1_0.txt
44

5-
cmake_minimum_required(VERSION 3.5...3.16)
5+
cmake_minimum_required(VERSION 3.8...3.16)
66

77
project(boost_test VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
88

@@ -30,60 +30,74 @@ set(_boost_test_dependencies
3030
Boost::utility
3131
)
3232

33-
# Compiled targets
33+
option(BOOST_TEST_HEADERS_ONLY "Boost.Test: Only install headers" OFF)
3434

35-
function(boost_test_add_library name)
35+
set(_boost_test_libraries "")
3636

37-
add_library(boost_${name} ${ARGN})
38-
add_library(Boost::${name} ALIAS boost_${name})
37+
if (NOT BOOST_TEST_HEADERS_ONLY)
3938

40-
target_include_directories(boost_${name} PUBLIC include)
41-
target_link_libraries(boost_${name} PUBLIC ${_boost_test_dependencies})
39+
# Compiled targets
4240

43-
target_compile_definitions(boost_${name}
44-
PUBLIC BOOST_TEST_NO_LIB
45-
# Source files already define BOOST_TEST_SOURCE
46-
# PRIVATE BOOST_TEST_SOURCE
47-
)
41+
function(boost_test_add_library name)
4842

49-
if(BUILD_SHARED_LIBS)
50-
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_DYN_LINK)
51-
else()
52-
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_STATIC_LINK)
53-
endif()
43+
add_library(boost_${name} ${ARGN})
44+
add_library(Boost::${name} ALIAS boost_${name})
5445

55-
endfunction()
46+
target_include_directories(boost_${name} PUBLIC include)
47+
target_link_libraries(boost_${name} PUBLIC ${_boost_test_dependencies})
5648

57-
boost_test_add_library(prg_exec_monitor
58-
src/cpp_main.cpp
59-
src/debug.cpp
60-
src/execution_monitor.cpp
61-
)
49+
target_compile_definitions(boost_${name}
50+
PUBLIC BOOST_TEST_NO_LIB
51+
# Source files already define BOOST_TEST_SOURCE
52+
# PRIVATE BOOST_TEST_SOURCE
53+
)
6254

63-
set(SOURCES
64-
src/compiler_log_formatter.cpp
65-
src/debug.cpp
66-
src/decorator.cpp
67-
src/execution_monitor.cpp
68-
src/framework.cpp
69-
src/junit_log_formatter.cpp
70-
src/plain_report_formatter.cpp
71-
src/progress_monitor.cpp
72-
src/results_collector.cpp
73-
src/results_reporter.cpp
74-
src/test_framework_init_observer.cpp
75-
src/test_tools.cpp
76-
src/test_tree.cpp
77-
src/unit_test_log.cpp
78-
src/unit_test_main.cpp
79-
src/unit_test_monitor.cpp
80-
src/unit_test_parameters.cpp
81-
src/xml_log_formatter.cpp
82-
src/xml_report_formatter.cpp
83-
)
55+
if(WIN32)
56+
target_compile_definitions(boost_${name} PRIVATE _CRT_SECURE_NO_WARNINGS)
57+
endif()
58+
59+
if(BUILD_SHARED_LIBS)
60+
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_DYN_LINK)
61+
else()
62+
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_STATIC_LINK)
63+
endif()
64+
65+
endfunction()
8466

85-
boost_test_add_library(test_exec_monitor STATIC ${SOURCES} src/test_main.cpp)
86-
boost_test_add_library(unit_test_framework ${SOURCES})
67+
boost_test_add_library(prg_exec_monitor
68+
src/cpp_main.cpp
69+
src/debug.cpp
70+
src/execution_monitor.cpp
71+
)
72+
73+
set(SOURCES
74+
src/compiler_log_formatter.cpp
75+
src/debug.cpp
76+
src/decorator.cpp
77+
src/execution_monitor.cpp
78+
src/framework.cpp
79+
src/junit_log_formatter.cpp
80+
src/plain_report_formatter.cpp
81+
src/progress_monitor.cpp
82+
src/results_collector.cpp
83+
src/results_reporter.cpp
84+
src/test_framework_init_observer.cpp
85+
src/test_tools.cpp
86+
src/test_tree.cpp
87+
src/unit_test_log.cpp
88+
src/unit_test_main.cpp
89+
src/unit_test_monitor.cpp
90+
src/unit_test_parameters.cpp
91+
src/xml_log_formatter.cpp
92+
src/xml_report_formatter.cpp
93+
)
94+
95+
boost_test_add_library(test_exec_monitor STATIC ${SOURCES} src/test_main.cpp)
96+
boost_test_add_library(unit_test_framework ${SOURCES})
97+
98+
set(_boost_test_libraries boost_prg_exec_monitor boost_test_exec_monitor boost_unit_test_framework)
99+
100+
endif()
87101

88102
# Header-only targets
89103

@@ -107,7 +121,7 @@ if(BOOST_SUPERPROJECT_VERSION AND NOT CMAKE_VERSION VERSION_LESS 3.13)
107121

108122
boost_install(
109123
TARGETS
110-
boost_prg_exec_monitor boost_test_exec_monitor boost_unit_test_framework
124+
${_boost_test_libraries}
111125
boost_included_prg_exec_monitor boost_included_test_exec_monitor boost_included_unit_test_framework
112126
VERSION ${BOOST_SUPERPROJECT_VERSION}
113127
HEADER_DIRECTORY include

Jamfile.v2

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ Boost.Test uses mostly the facility provided by our wonderful Boost testers (col
5353
5454
Branch | Deps | Docs | Tests | Github Actions |
5555
:-------------: | ---- | ---- | ----- | -------------- |
56-
[`master`](https://github.com/boostorg/test/tree/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/test.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/test.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/test.html) | [![Build Status](https://github.com/boostorg/test/workflows/CI/badge.svg?branch=master)](https://github.com/boostorg/test/actions)
57-
[`develop`](https://github.com/boostorg/test/tree/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/test.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/test.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/test.html) | [![Build Status](https://github.com/boostorg/test/workflows/CI/badge.svg?branch=develop)](https://github.com/boostorg/test/actions)
56+
[`master`](https://github.com/boostorg/test/tree/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/test.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/test.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](https://regression.boost.io/master/developer/test.html) | [![Build Status](https://github.com/boostorg/test/workflows/CI/badge.svg?branch=master)](https://github.com/boostorg/test/actions)
57+
[`develop`](https://github.com/boostorg/test/tree/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/test.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/test.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](https://regression.boost.io/develop/developer/test.html) | [![Build Status](https://github.com/boostorg/test/workflows/CI/badge.svg?branch=develop)](https://github.com/boostorg/test/actions)

build.jam

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright René Ferdinand Rivera Morell 2023-2024
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
require-b2 5.2 ;
7+
8+
constant boost_dependencies :
9+
/boost/algorithm//boost_algorithm
10+
/boost/assert//boost_assert
11+
/boost/bind//boost_bind
12+
/boost/config//boost_config
13+
/boost/core//boost_core
14+
/boost/detail//boost_detail
15+
/boost/exception//boost_exception
16+
/boost/function//boost_function
17+
/boost/io//boost_io
18+
/boost/iterator//boost_iterator
19+
/boost/mpl//boost_mpl
20+
/boost/numeric_conversion//boost_numeric_conversion
21+
/boost/optional//boost_optional
22+
/boost/preprocessor//boost_preprocessor
23+
/boost/smart_ptr//boost_smart_ptr
24+
/boost/static_assert//boost_static_assert
25+
/boost/type_traits//boost_type_traits
26+
/boost/utility//boost_utility ;
27+
28+
project /boost/test
29+
: common-requirements
30+
<include>include
31+
;
32+
33+
explicit
34+
[ alias boost_test : : : : <library>$(boost_dependencies) ]
35+
[ alias boost_prg_exec_monitor : build//boost_prg_exec_monitor ]
36+
[ alias boost_test_exec_monitor : build//boost_test_exec_monitor ]
37+
[ alias boost_unit_test_framework : build//boost_unit_test_framework ]
38+
[ alias prg_exec_monitor : boost_prg_exec_monitor ]
39+
[ alias test_exec_monitor : boost_test_exec_monitor ]
40+
[ alias unit_test_framework : boost_unit_test_framework ]
41+
[ alias boost_included_prg_exec_monitor : : : : <library>$(boost_dependencies) ]
42+
[ alias boost_included_test_exec_monitor : : : : <library>$(boost_dependencies) ]
43+
[ alias boost_included_unit_test_framework : : : : <library>$(boost_dependencies) ]
44+
[ alias included : : : : <library>$(boost_dependencies) ]
45+
[ alias included_prg_exec_monitor : boost_included_prg_exec_monitor ]
46+
[ alias included_test_exec_monitor : boost_included_test_exec_monitor ]
47+
[ alias included_unit_test_framework : boost_included_unit_test_framework ]
48+
[ alias all : example test
49+
boost_prg_exec_monitor
50+
boost_test_exec_monitor
51+
boost_unit_test_framework ]
52+
;
53+
54+
call-if : boost-library test
55+
: install
56+
boost_prg_exec_monitor
57+
boost_test_exec_monitor
58+
boost_unit_test_framework
59+
;
60+

build/Jamfile.v2

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
import os ;
88

9-
import ../../predef/tools/check/predef
9+
import-search /boost/predef/tools/check ;
10+
import predef
1011
: check
1112
: predef-check ;
1213

13-
project boost/test
14+
project
1415
: source-location ../src
16+
: common-requirements <library>$(boost_dependencies)
1517
: requirements <link>shared:<define>BOOST_TEST_DYN_LINK=1
1618
<toolset>borland:<cxxflags>-w-8080
1719
<target-os>cygwin:<define>_POSIX_C_SOURCE=200112L
@@ -26,7 +28,7 @@ project boost/test
2628
# <warnings-as-errors>on
2729

2830
: usage-requirements
29-
<define>BOOST_TEST_NO_AUTO_LINK=1
31+
<define>BOOST_TEST_NO_LIB=1
3032
# Disable Warning about boost::noncopyable not being exported
3133
<link>shared,<toolset>msvc:<cxxflags>-wd4275
3234
;
@@ -113,7 +115,3 @@ lib boost_unit_test_framework
113115
alias minimal ;
114116

115117
alias included ;
116-
117-
boost-install boost_prg_exec_monitor
118-
boost_test_exec_monitor
119-
boost_unit_test_framework ;

0 commit comments

Comments
 (0)