Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 21 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,22 @@ jobs:
- toolset: gcc-9
cxxstd: "17,2a"
address_model: 64
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- g++-9-multilib
- toolset: gcc-9
cxxstd: "17-gnu,2a-gnu"
address_model: 64
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- g++-9-multilib
- toolset: gcc-10
cxxstd: "17,20"
address_model: 64
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- g++-10-multilib
- toolset: gcc-11
Expand All @@ -110,13 +113,13 @@ jobs:
install:
- g++-12-multilib
- name: UBSAN
toolset: gcc-12
cxxstd: "17"
toolset: gcc-13
cxxstd: "11"
address_model: 64
ubsan: 1
os: ubuntu-22.04
os: ubuntu-24.04
install:
- g++-12-multilib
- g++-13-multilib

# Linux, clang
- toolset: clang
Expand Down Expand Up @@ -174,13 +177,15 @@ jobs:
- toolset: clang
compiler: clang++-9
cxxstd: "17,2a"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- clang-9
- toolset: clang
compiler: clang++-10
cxxstd: "17,20"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- clang-10
- toolset: clang
Expand Down Expand Up @@ -252,10 +257,10 @@ jobs:

- toolset: clang
cxxstd: "20"
os: macos-13
os: macos-14
- toolset: clang
cxxstd: "20"
os: macos-14
os: macos-15

runs-on: ${{matrix.os}}
container:
Expand Down Expand Up @@ -468,14 +473,6 @@ jobs:
fail-fast: false
matrix:
include:
- toolset: msvc-14.0
cxxstd: "11"
addrmd: 64
os: windows-2019
- toolset: msvc-14.2
cxxstd: "14"
addrmd: 64
os: windows-2019
- toolset: msvc-14.3
cxxstd: "20"
addrmd: 64
Expand All @@ -487,7 +484,7 @@ jobs:
- toolset: gcc
cxxstd: "17"
addrmd: 64
os: windows-2019
os: windows-2022

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

Expand Down Expand Up @@ -531,10 +528,10 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' }
- { os: ubuntu-20.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
- { os: windows-2019, build_shared: ON, build_type: Debug, generator: 'Visual Studio 16 2019' }
- { os: windows-2019, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 16 2019' }
- { os: ubuntu-22.04, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' }
- { os: ubuntu-22.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
- { os: windows-2025, build_shared: ON, build_type: Debug, generator: 'Visual Studio 17 2022' }
- { os: windows-2025, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 17 2022' }

timeout-minutes: 120
runs-on: ${{matrix.os}}
Expand Down
108 changes: 61 additions & 47 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

cmake_minimum_required(VERSION 3.5...3.16)
cmake_minimum_required(VERSION 3.8...3.16)

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

Expand Down Expand Up @@ -30,60 +30,74 @@ set(_boost_test_dependencies
Boost::utility
)

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

function(boost_test_add_library name)
set(_boost_test_libraries "")

add_library(boost_${name} ${ARGN})
add_library(Boost::${name} ALIAS boost_${name})
if (NOT BOOST_TEST_HEADERS_ONLY)

target_include_directories(boost_${name} PUBLIC include)
target_link_libraries(boost_${name} PUBLIC ${_boost_test_dependencies})
# Compiled targets

target_compile_definitions(boost_${name}
PUBLIC BOOST_TEST_NO_LIB
# Source files already define BOOST_TEST_SOURCE
# PRIVATE BOOST_TEST_SOURCE
)
function(boost_test_add_library name)

if(BUILD_SHARED_LIBS)
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_DYN_LINK)
else()
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_STATIC_LINK)
endif()
add_library(boost_${name} ${ARGN})
add_library(Boost::${name} ALIAS boost_${name})

endfunction()
target_include_directories(boost_${name} PUBLIC include)
target_link_libraries(boost_${name} PUBLIC ${_boost_test_dependencies})

boost_test_add_library(prg_exec_monitor
src/cpp_main.cpp
src/debug.cpp
src/execution_monitor.cpp
)
target_compile_definitions(boost_${name}
PUBLIC BOOST_TEST_NO_LIB
# Source files already define BOOST_TEST_SOURCE
# PRIVATE BOOST_TEST_SOURCE
)

set(SOURCES
src/compiler_log_formatter.cpp
src/debug.cpp
src/decorator.cpp
src/execution_monitor.cpp
src/framework.cpp
src/junit_log_formatter.cpp
src/plain_report_formatter.cpp
src/progress_monitor.cpp
src/results_collector.cpp
src/results_reporter.cpp
src/test_framework_init_observer.cpp
src/test_tools.cpp
src/test_tree.cpp
src/unit_test_log.cpp
src/unit_test_main.cpp
src/unit_test_monitor.cpp
src/unit_test_parameters.cpp
src/xml_log_formatter.cpp
src/xml_report_formatter.cpp
)
if(WIN32)
target_compile_definitions(boost_${name} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()

if(BUILD_SHARED_LIBS)
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_DYN_LINK)
else()
target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_STATIC_LINK)
endif()

endfunction()

boost_test_add_library(test_exec_monitor STATIC ${SOURCES} src/test_main.cpp)
boost_test_add_library(unit_test_framework ${SOURCES})
boost_test_add_library(prg_exec_monitor
src/cpp_main.cpp
src/debug.cpp
src/execution_monitor.cpp
)

set(SOURCES
src/compiler_log_formatter.cpp
src/debug.cpp
src/decorator.cpp
src/execution_monitor.cpp
src/framework.cpp
src/junit_log_formatter.cpp
src/plain_report_formatter.cpp
src/progress_monitor.cpp
src/results_collector.cpp
src/results_reporter.cpp
src/test_framework_init_observer.cpp
src/test_tools.cpp
src/test_tree.cpp
src/unit_test_log.cpp
src/unit_test_main.cpp
src/unit_test_monitor.cpp
src/unit_test_parameters.cpp
src/xml_log_formatter.cpp
src/xml_report_formatter.cpp
)

boost_test_add_library(test_exec_monitor STATIC ${SOURCES} src/test_main.cpp)
boost_test_add_library(unit_test_framework ${SOURCES})

set(_boost_test_libraries boost_prg_exec_monitor boost_test_exec_monitor boost_unit_test_framework)

endif()

# Header-only targets

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

boost_install(
TARGETS
boost_prg_exec_monitor boost_test_exec_monitor boost_unit_test_framework
${_boost_test_libraries}
boost_included_prg_exec_monitor boost_included_test_exec_monitor boost_included_unit_test_framework
VERSION ${BOOST_SUPERPROJECT_VERSION}
HEADER_DIRECTORY include
Expand Down
9 changes: 0 additions & 9 deletions Jamfile.v2

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ Boost.Test uses mostly the facility provided by our wonderful Boost testers (col

Branch | Deps | Docs | Tests | Github Actions |
:-------------: | ---- | ---- | ----- | -------------- |
[`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)
[`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)
[`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)
[`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)
60 changes: 60 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# 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)

require-b2 5.2 ;

constant boost_dependencies :
/boost/algorithm//boost_algorithm
/boost/assert//boost_assert
/boost/bind//boost_bind
/boost/config//boost_config
/boost/core//boost_core
/boost/detail//boost_detail
/boost/exception//boost_exception
/boost/function//boost_function
/boost/io//boost_io
/boost/iterator//boost_iterator
/boost/mpl//boost_mpl
/boost/numeric_conversion//boost_numeric_conversion
/boost/optional//boost_optional
/boost/preprocessor//boost_preprocessor
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility ;

project /boost/test
: common-requirements
<include>include
;

explicit
[ alias boost_test : : : : <library>$(boost_dependencies) ]
[ alias boost_prg_exec_monitor : build//boost_prg_exec_monitor ]
[ alias boost_test_exec_monitor : build//boost_test_exec_monitor ]
[ alias boost_unit_test_framework : build//boost_unit_test_framework ]
[ alias prg_exec_monitor : boost_prg_exec_monitor ]
[ alias test_exec_monitor : boost_test_exec_monitor ]
[ alias unit_test_framework : boost_unit_test_framework ]
[ alias boost_included_prg_exec_monitor : : : : <library>$(boost_dependencies) ]
[ alias boost_included_test_exec_monitor : : : : <library>$(boost_dependencies) ]
[ alias boost_included_unit_test_framework : : : : <library>$(boost_dependencies) ]
[ alias included : : : : <library>$(boost_dependencies) ]
[ alias included_prg_exec_monitor : boost_included_prg_exec_monitor ]
[ alias included_test_exec_monitor : boost_included_test_exec_monitor ]
[ alias included_unit_test_framework : boost_included_unit_test_framework ]
[ alias all : example test
boost_prg_exec_monitor
boost_test_exec_monitor
boost_unit_test_framework ]
;

call-if : boost-library test
: install
boost_prg_exec_monitor
boost_test_exec_monitor
boost_unit_test_framework
;

12 changes: 5 additions & 7 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

import os ;

import ../../predef/tools/check/predef
import-search /boost/predef/tools/check ;
import predef
: check
: predef-check ;

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

: usage-requirements
<define>BOOST_TEST_NO_AUTO_LINK=1
<define>BOOST_TEST_NO_LIB=1
# Disable Warning about boost::noncopyable not being exported
<link>shared,<toolset>msvc:<cxxflags>-wd4275
;
Expand Down Expand Up @@ -113,7 +115,3 @@ lib boost_unit_test_framework
alias minimal ;

alias included ;

boost-install boost_prg_exec_monitor
boost_test_exec_monitor
boost_unit_test_framework ;
Loading