Files
date_time/test/Jamfile.v2
René Ferdinand Rivera Morell 645574e5df Add support for modular build structure. (#239)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing NO_LIB usage requirements.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Adjust doc build to avoid boost-root references.

* Update build deps.

* Rework GHA to use containers for the ubuntu that are god or going away.

* Remove obsolete package installs.

* Need another package?

* Some deepndencies are now C++11 only. Hence date_time is now also C++11 only.

* Switch macOS test to use the latest version.

* Remove not-needed software-properties-common package.

* Remove setup gcc toolchain step.

* Install some missing compilers.

* Maybe the gcc builds for the specific ubuntu versions rea broken. Switch to something newer.
2025-06-27 02:30:25 +03:00

170 lines
5.6 KiB
Plaintext

import os ;
import path ;
import regex ;
import testing ;
project : requirements <library>/boost/date_time//boost_date_time ;
local DATE_TIME_DYNAMIC_PROPERTIES = <define>BOOST_ALL_DYN_LINK <runtime-link>shared <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG <define>BOOST_ALL_NO_LIB ;
local DATE_TIME_PROPERTIES = <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
# FIXME
#std::locale-support
<define>BOOST_ALL_NO_LIB ;
# core stuff
run testint_adapter.cpp ;
run testtime_resolution_traits.cpp ;
run testwrapping_int.cpp ;
run testconstrained_value.cpp ;
run testgregorian_calendar.cpp ;
run testgeneric_period.cpp ;
# the library dependence below is just to test that the
# stub library will build, it's completely uneeded not that
# date-time is all inline
run testmisc.cpp
../build//boost_date_time/<link>static
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testmisc_std_cfg ;
### gregorian
run gregorian/testdate.cpp ;
run gregorian/testdate_duration.cpp ;
run gregorian/testdate_facet_new.cpp ;
run gregorian/testdate_input_facet.cpp ;
run gregorian/testdate_iterator.cpp ;
run gregorian/testgenerators.cpp ;
run gregorian/testgreg_cal.cpp ;
run gregorian/testgreg_day.cpp ;
run gregorian/testgreg_durations.cpp ;
run gregorian/testgreg_month.cpp ;
run gregorian/testgreg_year.cpp ;
run gregorian/testformatters.cpp ;
run gregorian/testparse_date.cpp ;
run gregorian/testperiod.cpp ;
run gregorian/testgreg_serialize.cpp
/boost/serialization//boost_serialization
: : : <define>DATE_TIME_XML_SERIALIZE
: testgreg_serialize_xml ;
run gregorian/testgreg_serialize.cpp
/boost/serialization//boost_serialization
: : :
: testgreg_serialize ;
run posix_time/testfiletime_functions.cpp ;
run posix_time/testlocal_adjustor.cpp ;
run posix_time/testc_local_adjustor.cpp ;
run posix_time/testclock.cpp ;
run posix_time/testdst_rules.cpp ;
run posix_time/testduration.cpp ;
run posix_time/testiterator.cpp ;
run posix_time/testparse_time.cpp ;
run posix_time/testtime_period.cpp ;
run posix_time/testtime.cpp ;
run posix_time/testmicrosec_time_clock.cpp ;
run posix_time/testgreg_duration_operators.cpp ;
run posix_time/testtime_facet.cpp ;
run posix_time/testtime_input_facet.cpp
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_input_facet ;
run posix_time/testtime_formatters.cpp
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_formatters ;
# text archive tests
run posix_time/testtime_serialize.cpp
/boost/serialization//boost_serialization
: : :
: testtime_serialize ;
run posix_time/testtime_serialize.cpp
/boost/serialization//boost_serialization
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_serialize_std_config ;
# xml archive tests
run posix_time/testtime_serialize.cpp
/boost/serialization//boost_serialization
: : : <define>DATE_TIME_XML_SERIALIZE <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_serialize_xml_std_config ;
run posix_time/testtime_serialize.cpp
/boost/serialization//boost_serialization
: : : <define>DATE_TIME_XML_SERIALIZE
: testtime_serialize_xml ;
# versioning tests
run posix_time/testtime_serialize_versioning.cpp
/boost/serialization//boost_serialization
: : testtime_serialize_versioning_prev
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_serialize_versioning_curr ;
run posix_time/testtime_serialize_versioning.cpp
/boost/serialization//boost_serialization
: : : <define>BOOST_DATE_TIME_POSIX_TIME_DURATION_VERSION=0
: testtime_serialize_versioning_prev ;
compile-fail posix_time/compile_fail/hours_special_value.cpp ;
compile-fail posix_time/compile_fail/minutes_special_value.cpp ;
compile-fail posix_time/compile_fail/seconds_special_value.cpp ;
compile-fail posix_time/compile_fail/millisec_special_value.cpp ;
run local_time/testdst_transition_day_rule.cpp ;
run local_time/testcustom_time_zone.cpp ;
run local_time/testposix_time_zone.cpp ;
run local_time/testwcustom_time_zone.cpp ;
run local_time/testwposix_time_zone.cpp ;
run local_time/testlocal_time.cpp ;
run local_time/testlocal_time_iterator.cpp ;
run local_time/testlocal_time_period.cpp ;
run local_time/testtz_database.cpp
: : ../data/date_time_zonespec.csv local_time/poorly_formed_zonespec.csv
: ;
run local_time/testlocal_time_facet.cpp
: : ../data/date_time_zonespec.csv : ;
run local_time/testclocks.cpp ;
#todo
#if ! [ os.environ UBSAN_OPTIONS ]
#{
# local DATE_TIME_PROPERTIES = <define>BOOST_ALL_NO_LIB <define>USE_DATE_TIME_PRE_1_33_FACET_IO
# # FIXME
# # std::locale-support toolset::require-boost-spirit-support
# ;
# Iterate over all public headers and generate a self-contained header test to check for any missing includes
# and basic syntax errors.
if ! [ os.environ BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
{
for file in [ glob-tree-ex ../include/boost : *.hpp ]
{
local rel_file = [ path.relative-to ../include/boost $(file) ] ;
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
#ECHO $(rel_file) ;
compile self_contained_header.cpp : <define>"BOOST_DATE_TIME_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ;
}
}
# Copyright (c) 2000-2020
# CrystalClear Software, Inc.
# Subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)