mirror of
https://github.com/boostorg/system.git
synced 2025-07-29 20:17:13 +02:00
Merge branch 'develop' into feature/constexpr
This commit is contained in:
48
.travis.yml
48
.travis.yml
@ -98,7 +98,6 @@ matrix:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
@ -108,10 +107,36 @@ matrix:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-7
|
||||
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.3
|
||||
|
||||
- os: linux
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.4
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.5
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||
@ -194,6 +219,17 @@ matrix:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-5.0
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-libc++
|
||||
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
||||
@ -202,6 +238,14 @@ matrix:
|
||||
packages:
|
||||
- libc++-dev
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-libc++
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libc++-dev
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
@ -222,7 +266,7 @@ install:
|
||||
script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
- ./b2 -j3 libs/system/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
- ./b2 -j3 libs/system/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=undefined} ${UBSAN:+cxxflags=-fno-sanitize-recover=undefined} ${UBSAN:+linkflags=-fsanitize=undefined} ${UBSAN:+define=UBSAN=1}
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
117
test/Jamfile.v2
117
test/Jamfile.v2
@ -61,97 +61,54 @@ project
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule system-run- ( sources + )
|
||||
{
|
||||
local result ;
|
||||
|
||||
result += [ run $(sources) : : : <link>static : $(sources[1]:B)_static ] ;
|
||||
result += [ run $(sources) : : : <link>shared : $(source:B)_shared ] ;
|
||||
result += [ run $(sources) : : : -<library>/boost/system//boost_system <define>BOOST_ERROR_CODE_HEADER_ONLY : $(sources[1]:B)_header ] ;
|
||||
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule system-run ( sources + )
|
||||
{
|
||||
local result = [ system-run- $(sources) ] ;
|
||||
|
||||
# Test a source file built with -std=c++03 linked with a System library built without -std=c++03
|
||||
result += [ run $(sources) : : : <link>static <conditional>@cxx03 : $(sources[1]:B)_static_03 ] ;
|
||||
result += [ run $(sources) : : : <link>shared <conditional>@cxx03 : $(sources[1]:B)_shared_03 ] ;
|
||||
|
||||
# Test a source file built with -std=c++11 linked with a System library built without -std=c++11
|
||||
result += [ run $(sources) : : : <link>static <conditional>@cxx11 : $(sources[1]:B)_static_11 ] ;
|
||||
result += [ run $(sources) : : : <link>shared <conditional>@cxx11 : $(sources[1]:B)_shared_11 ] ;
|
||||
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
test-suite "system"
|
||||
: [ run error_code_test.cpp
|
||||
: # command line
|
||||
: # input files
|
||||
: # requirements
|
||||
<link>static
|
||||
]
|
||||
[ run error_code_test.cpp
|
||||
: : : <link>shared : error_code_test_shared
|
||||
]
|
||||
[ run error_code_test.cpp
|
||||
: : : <link>static <conditional>@cxx03 : error_code_test_03
|
||||
]
|
||||
[ run error_code_test.cpp
|
||||
: : : <link>shared <conditional>@cxx03 : error_code_test_shared_03
|
||||
]
|
||||
[ run error_code_test.cpp
|
||||
: : : <link>static <conditional>@cxx11 : error_code_test_11
|
||||
]
|
||||
[ run error_code_test.cpp
|
||||
: : : <link>shared <conditional>@cxx11 : error_code_test_shared_11
|
||||
]
|
||||
[ run error_code_user_test.cpp
|
||||
: : : <link>static
|
||||
]
|
||||
[ run error_code_user_test.cpp
|
||||
: : : <link>shared : error_code_user_test_shared
|
||||
]
|
||||
[ run system_error_test.cpp
|
||||
: : : <link>static
|
||||
]
|
||||
[ run system_error_test.cpp
|
||||
: : : <link>shared : system_error_test_shared
|
||||
]
|
||||
: [ system-run error_code_test.cpp ]
|
||||
[ system-run error_code_user_test.cpp ]
|
||||
[ system-run system_error_test.cpp ]
|
||||
[ run dynamic_link_test.cpp throw_test
|
||||
: : : <link>shared : throw_test_shared
|
||||
]
|
||||
[ run initialization_test.cpp
|
||||
: : : <link>shared : initialization_test_shared
|
||||
]
|
||||
[ system-run initialization_test.cpp ]
|
||||
[ run header_only_test.cpp
|
||||
: : : -<library>/boost/system//boost_system
|
||||
]
|
||||
[ run config_test.cpp
|
||||
: : : <test-info>always_show_run_output
|
||||
]
|
||||
[ run std_interop_test.cpp
|
||||
: : : <link>static
|
||||
]
|
||||
[ run std_interop_test.cpp
|
||||
: : : <link>shared : std_interop_test_shared
|
||||
]
|
||||
[ run std_mismatch_test.cpp
|
||||
: : : <link>static <conditional>@cxx03 : std_mismatch_test_03
|
||||
]
|
||||
[ run std_mismatch_test.cpp
|
||||
: : : <link>shared <conditional>@cxx03 : std_mismatch_test_shared_03
|
||||
]
|
||||
[ run std_mismatch_test.cpp
|
||||
: : : <link>static <conditional>@cxx11 : std_mismatch_test_11
|
||||
]
|
||||
[ run std_mismatch_test.cpp
|
||||
: : : <link>shared <conditional>@cxx11 : std_mismatch_test_shared_11
|
||||
]
|
||||
[ run header_only_test.cpp
|
||||
: : : -<library>/boost/system//boost_system <define>BOOST_NO_ANSI_APIS : header_only_test_no_ansi
|
||||
]
|
||||
[ run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp
|
||||
: : : <link>static : single_instance_test_static
|
||||
]
|
||||
[ run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp
|
||||
: : : <link>shared : single_instance_test_shared
|
||||
]
|
||||
[ run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp
|
||||
: : : -<library>/boost/system//boost_system <define>BOOST_ERROR_CODE_HEADER_ONLY : single_instance_test_header
|
||||
]
|
||||
[ run before_main_test.cpp
|
||||
: : : <link>static : before_main_test_static
|
||||
]
|
||||
[ run before_main_test.cpp
|
||||
: : : <link>shared : before_main_test_shared
|
||||
]
|
||||
[ run before_main_test.cpp
|
||||
: : : -<library>/boost/system//boost_system <define>BOOST_ERROR_CODE_HEADER_ONLY : before_main_test_header
|
||||
]
|
||||
[ run constexpr_test.cpp
|
||||
: : : <link>static : constexpr_test_static
|
||||
]
|
||||
[ run constexpr_test.cpp
|
||||
: : : <link>shared : constexpr_test_shared
|
||||
[ run config_test.cpp
|
||||
: : : <test-info>always_show_run_output
|
||||
]
|
||||
[ system-run- std_interop_test.cpp ]
|
||||
[ system-run std_mismatch_test.cpp ]
|
||||
[ system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ]
|
||||
[ system-run before_main_test.cpp ]
|
||||
[ system-run- constexpr_test.cpp ]
|
||||
;
|
||||
|
||||
# Quick (CI) test
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <boost/cerrno.hpp>
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
// Although using directives are not the best programming practice, testing
|
||||
// with a boost::system using directive increases use scenario coverage.
|
||||
@ -246,8 +247,17 @@ int main( int, char ** )
|
||||
BOOST_TEST( econd.message() != "" );
|
||||
BOOST_TEST( econd.message().substr( 0, 13) != "Unknown error" );
|
||||
|
||||
#if !defined(UBSAN)
|
||||
|
||||
// the current implementation of boost::throws() relies on undefined behavior
|
||||
test_throws_usage();
|
||||
|
||||
#else
|
||||
|
||||
BOOST_PRAGMA_MESSAGE("Skipping test_throws_usage() due to UBSAN");
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_WINDOWS_API
|
||||
std::cout << "Windows tests...\n";
|
||||
// these tests probe the Windows errc decoder
|
||||
|
Reference in New Issue
Block a user