add ascii test and clarify why tests are skipped (#357)

This commit is contained in:
Hans Dembinski
2022-07-19 21:17:39 +02:00
committed by GitHub
parent 1a754bac77
commit bebb509224
2 changed files with 33 additions and 22 deletions

View File

@@ -52,17 +52,20 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(BUILD_TESTING OFF) # do not build tests of dependencies
boost_fetch(boostorg/static_assert TAG develop EXCLUDE_FROM_ALL)
boost_fetch(boostorg/assert TAG develop EXCLUDE_FROM_ALL) # needed by core
boost_fetch(boostorg/config TAG develop EXCLUDE_FROM_ALL)
boost_fetch(boostorg/core TAG develop EXCLUDE_FROM_ALL)
boost_fetch(boostorg/mp11 TAG develop EXCLUDE_FROM_ALL)
boost_fetch(boostorg/throw_exception TAG develop EXCLUDE_FROM_ALL)
boost_fetch(boostorg/variant2 TAG develop EXCLUDE_FROM_ALL)
## No cmake support yet
# boost_fetch(boostorg/accumulators TAG develop)
# boost_fetch(boostorg/range TAG develop)
# boost_fetch(boostorg/serialization TAG develop)
# boost_fetch(boostorg/units TAG develop)
boost_fetch(boostorg/assert TAG develop EXCLUDE_FROM_ALL) # needed by core
## skipping serialization, range, accumulators, units;
## the tests pull in too many dependencies
# boost_fetch(boostorg/serialization TAG develop EXCLUDE_FROM_ALL)
# boost_fetch(boostorg/units TAG develop EXCLUDE_FROM_ALL)
# boost_fetch(boostorg/range TAG develop EXCLUDE_FROM_ALL)
# boost_fetch(boostorg/accumulators TAG develop EXCLUDE_FROM_ALL)
set(BUILD_TESTING ON)

View File

@@ -12,13 +12,12 @@ if (PYTHONINTERP_FOUND)
endif()
include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
if(NOT HAVE_BOOST_TEST)
return()
endif()
if(HAVE_BOOST_TEST)
set(BOOST_TEST_LINK_LIBRARIES Boost::histogram)
# keep in sync with Jamfile, this should be automated...
# keep in sync with Jamfile, check_build_system test will complain if you don't
boost_test(TYPE compile-fail SOURCES axis_category_fail0.cpp)
boost_test(TYPE compile-fail SOURCES axis_category_fail1.cpp)
boost_test(TYPE compile-fail SOURCES axis_category_fail2.cpp)
@@ -105,24 +104,31 @@ if (Threads_FOUND)
endif()
## No cmake support yet
# boost_test(TYPE link SOURCES odr_main_test.cpp odr_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES boost_accumulators_support_test.cpp
# LINK_LIBRARIES Boost::accumulators)
## serialization, range, units, accumulators pull in too many dependencies
# boost_test(TYPE run SOURCES boost_range_support_test.cpp
# LINK_LIBRARIES Boost::range)
# LINK_LIBRARIES Boost::range)
# boost_test(TYPE run SOURCES boost_accumulators_support_test.cpp
# LINK_LIBRARIES Boost::accumulators)
# boost_test(TYPE run SOURCES boost_units_support_test.cpp
# LINK_LIBRARIES Boost::units)
# boost_test(TYPE run SOURCES detail_array_wrapper_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES unlimited_storage_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES storage_adaptor_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES histogram_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
# LINK_LIBRARIES Boost::units)
# boost_test(TYPE link SOURCES odr_main_test.cpp odr_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES detail_array_wrapper_serialization_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES unlimited_storage_serialization_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES storage_adaptor_serialization_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES histogram_serialization_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES axis_variant_serialization_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES accumulators_serialization_test.cpp
# LINK_LIBRARIES Boost::serialization)
# boost_test(TYPE run SOURCES histogram_ostream_ascii_test.cpp)
boost_test(TYPE run SOURCES histogram_ostream_ascii_test.cpp)
set_tests_properties(run-boost_histogram-histogram_ostream_ascii_test_cpp
PROPERTIES ENVIRONMENT "LANG=FOO;COLUMNS=20")
# Workaround for gcc-5
if (NOT(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6))
@@ -135,3 +141,5 @@ if (NOT(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERS
)
endif()
endif()