| load(":boost_test_suite.bzl", "boost_test_suite") |
| |
| # These tests define their own main() and do not use Boost.Test, so they must |
| # not be linked against @boost.test//:unit_test_main. |
| _STANDALONE_TESTS = [ |
| "test_namespaces.cpp", |
| "test_rolex.cpp", |
| ] |
| |
| # Debian 13's gcc 14.2 does not extend the lifetime of a temporary bound to an |
| # rvalue reference to a virtual base subobject (works with gcc 13 and gcc 14.4), |
| # so this test reads a dangling object and crashes under -fstack-protector. |
| _GCC_INCOMPATIBLE_TESTS = ["test_custom_rtti.cpp"] |
| |
| boost_test_suite( |
| name = "upstream_tests", |
| srcs = glob( |
| ["test_*.cpp"], |
| exclude = _STANDALONE_TESTS + _GCC_INCOMPATIBLE_TESTS, |
| ), |
| deps = [ |
| "@boost.openmethod", |
| "@boost.test", |
| "@boost.test//:unit_test_main", |
| "@boost.utility", |
| ], |
| ) |
| |
| boost_test_suite( |
| name = "upstream_tests_without_gcc", |
| srcs = _GCC_INCOMPATIBLE_TESTS, |
| target_compatible_with = select({ |
| "@platforms//os:linux": ["@platforms//:incompatible"], |
| "//conditions:default": [], |
| }), |
| deps = [ |
| "@boost.openmethod", |
| "@boost.test", |
| "@boost.test//:unit_test_main", |
| "@boost.utility", |
| ], |
| ) |
| |
| boost_test_suite( |
| name = "upstream_standalone_tests", |
| srcs = _STANDALONE_TESTS, |
| deps = ["@boost.openmethod"], |
| ) |