diff --git a/.travis.yml b/.travis.yml index 7d0baaa7..9db3bca0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ # Copyright 2016, 2017 Peter Dimov -# Copyright 2017 Kohei Takahashi +# Copyright 2017-2018 Kohei Takahashi # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -167,6 +167,7 @@ install: - git submodule init libs/bind - git submodule init libs/concept_check - git submodule init libs/config + - git submodule init libs/container_hash - git submodule init libs/conversion - git submodule init libs/core - git submodule init libs/detail @@ -201,4 +202,4 @@ install: - ./b2 headers script: - - ./b2 libs/fusion/test toolset=$TOOLSET cxxstd=$CXXSTD define=RUNNING_ON_TRAVIS=1 + - ./b2 -j`(nproc || sysctl -n hw.ncpu) 2> /dev/null` libs/fusion/test toolset=$TOOLSET cxxstd=$CXXSTD diff --git a/appveyor.yml b/appveyor.yml index efccd5f4..d75679ef 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ # Copyright 2016, 2017 Peter Dimov -# Copyright 2017 Kohei Takahashi +# Copyright 2017-2018 Kohei Takahashi # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -39,6 +39,7 @@ install: - git submodule init libs/bind - git submodule init libs/concept_check - git submodule init libs/config + - git submodule init libs/container_hash - git submodule init libs/conversion - git submodule init libs/core - git submodule init libs/detail @@ -71,4 +72,4 @@ install: build: off test_script: - - b2 libs/fusion/test toolset=%TOOLSET% define=RUNNING_ON_APPVEYOR=1 + - b2 -j%NUMBER_OF_PROCESSORS% --hash libs/fusion/test toolset=%TOOLSET% diff --git a/test/Jamfile b/test/Jamfile index c9b87da4..82d715bb 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -1,7 +1,7 @@ ##============================================================================== # Copyright (c) 2003-2006 Joel de Guzman # Copyright (c) 2013 Mateusz Loskot -# Copyright (c) 2014-2017 Kohei Takahashi +# Copyright (c) 2014-2018 Kohei Takahashi # # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -9,10 +9,17 @@ #============================================================================== # bring in rules for testing import testing ; +import os ; import ../../config/checks/config : requires ; +if [ os.environ CI ] +{ + CI_DEFINES = CI_SKIP_KNOWN_FAILURE=1 ; +} + project : requirements + $(CI_DEFINES) ; { @@ -35,7 +42,8 @@ project [ run algorithm/insert.cpp ] [ run algorithm/insert_range.cpp ] [ run algorithm/iter_fold.cpp ] - [ run algorithm/move.cpp ] + [ run algorithm/move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run algorithm/none.cpp ] [ run algorithm/pop_back.cpp ] [ run algorithm/pop_front.cpp ] @@ -99,7 +107,8 @@ project [ compile sequence/deque_is_constructible.cpp ] [ run sequence/deque_make.cpp ] [ run sequence/deque_misc.cpp ] - [ run sequence/deque_move.cpp ] + [ run sequence/deque_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/deque_mutate.cpp ] [ run sequence/deque_nest.cpp ] [ run sequence/deque_tie.cpp ] @@ -113,7 +122,8 @@ project [ run sequence/map_construction.cpp ] [ run sequence/map_copy.cpp ] [ run sequence/map_misc.cpp ] - [ run sequence/map_move.cpp ] + [ run sequence/map_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/map_mutate.cpp ] [ run sequence/map_tie.cpp ] [ run sequence/nil.cpp ] @@ -152,7 +162,8 @@ project [ run sequence/vector_iterator.cpp ] [ run sequence/vector_make.cpp ] [ run sequence/vector_misc.cpp ] - [ run sequence/vector_move.cpp ] + [ run sequence/vector_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/vector_mutate.cpp ] [ run sequence/vector_n.cpp ] [ run sequence/vector_nest.cpp ] @@ -197,22 +208,28 @@ project [ run sequence/adt_attribute_proxy.cpp ] [ run sequence/define_struct.cpp ] [ run sequence/define_struct_empty.cpp ] - [ run sequence/define_struct_move.cpp ] + [ run sequence/define_struct_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/define_struct_inline.cpp ] [ run sequence/define_struct_inline_empty.cpp ] - [ run sequence/define_struct_inline_move.cpp ] + [ run sequence/define_struct_inline_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/define_assoc_struct.cpp ] [ run sequence/define_assoc_struct_empty.cpp ] - [ run sequence/define_assoc_struct_move.cpp ] + [ run sequence/define_assoc_struct_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/define_tpl_struct.cpp ] [ run sequence/define_tpl_struct_empty.cpp ] - [ run sequence/define_tpl_struct_move.cpp ] + [ run sequence/define_tpl_struct_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/define_tpl_struct_inline.cpp ] [ run sequence/define_tpl_struct_inline_empty.cpp ] - [ run sequence/define_tpl_struct_inline_move.cpp ] + [ run sequence/define_tpl_struct_inline_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/define_assoc_tpl_struct.cpp ] [ run sequence/define_assoc_tpl_struct_empty.cpp ] - [ run sequence/define_assoc_tpl_struct_move.cpp ] + [ run sequence/define_assoc_tpl_struct_move.cpp : : + : [ requires cxx11_rvalue_references ] ] [ run sequence/std_tuple.cpp : : : [ requires cxx11_variadic_templates cxx11_hdr_tuple ] ] [ run sequence/std_tuple_iterator.cpp : : @@ -243,8 +260,10 @@ project [ compile support/pair_set.cpp ] [ compile support/pair_vector.cpp ] [ compile support/pair_nest.cpp ] - [ compile support/index_sequence.cpp ] - [ compile support/and.cpp ] + [ compile support/index_sequence.cpp + : [ requires cxx11_variadic_templates ] ] + [ compile support/and.cpp + : [ requires cxx11_variadic_templates ] ] # [ compile-fail xxx.cpp ] diff --git a/test/algorithm/move.cpp b/test/algorithm/move.cpp index ac9ffed2..d2f85403 100644 --- a/test/algorithm/move.cpp +++ b/test/algorithm/move.cpp @@ -1,13 +1,9 @@ /*============================================================================= - Copyright (c) 2014 Kohei Takahashi + Copyright (c) 2014,2018 Kohei Takahashi 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) ==============================================================================*/ -#include - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - #include #include #include @@ -29,12 +25,3 @@ int main() return boost::report_errors(); } -#else - -int main() -{ - // no thing to do -} - -#endif - diff --git a/test/sequence/define_assoc_struct_move.cpp b/test/sequence/define_assoc_struct_move.cpp index 97c3d7ee..07def389 100644 --- a/test/sequence/define_assoc_struct_move.cpp +++ b/test/sequence/define_assoc_struct_move.cpp @@ -1,13 +1,9 @@ /*============================================================================= - Copyright (c) 2016 Kohei Takahashi + Copyright (c) 2016,2018 Kohei Takahashi 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) ==============================================================================*/ - -#include -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #include #include #include @@ -69,10 +65,3 @@ int main() return boost::report_errors(); } -#else - -int main() -{ -} - -#endif diff --git a/test/sequence/define_struct_inline_move.cpp b/test/sequence/define_struct_inline_move.cpp index 6cf2d053..951f7e4f 100644 --- a/test/sequence/define_struct_inline_move.cpp +++ b/test/sequence/define_struct_inline_move.cpp @@ -1,13 +1,9 @@ /*============================================================================= - Copyright (c) 2016 Kohei Takahashi + Copyright (c) 2016-2018 Kohei Takahashi 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) ==============================================================================*/ - -#include -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #include #include #include @@ -52,7 +48,7 @@ int main() } // Older MSVCs don't generate move ctor by default. -#if !(defined(RUNNING_ON_APPVEYOR) && BOOST_WORKAROUND(BOOST_MSVC, < 1900)) +#if !(defined(CI_SKIP_KNOWN_FAILURE) && BOOST_WORKAROUND(BOOST_MSVC, < 1900)) { ns::value x; ns::value y(std::move(x)); // move @@ -70,15 +66,8 @@ int main() BOOST_TEST(x.w.value == 0); BOOST_TEST(y.w.value == 0); } -#endif // !(appveyor && msvc < 14.0) +#endif // !(ci && msvc < 14.0) return boost::report_errors(); } -#else - -int main() -{ -} - -#endif diff --git a/test/sequence/define_struct_move.cpp b/test/sequence/define_struct_move.cpp index 9f9036bb..8732b59b 100644 --- a/test/sequence/define_struct_move.cpp +++ b/test/sequence/define_struct_move.cpp @@ -1,13 +1,9 @@ /*============================================================================= - Copyright (c) 2016 Kohei Takahashi + Copyright (c) 2016,2018 Kohei Takahashi 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) ==============================================================================*/ - -#include -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #include #include #include @@ -68,10 +64,3 @@ int main() return boost::report_errors(); } -#else - -int main() -{ -} - -#endif diff --git a/test/sequence/define_tpl_struct_inline_move.cpp b/test/sequence/define_tpl_struct_inline_move.cpp index 27be0573..b95da6f6 100644 --- a/test/sequence/define_tpl_struct_inline_move.cpp +++ b/test/sequence/define_tpl_struct_inline_move.cpp @@ -1,13 +1,9 @@ /*============================================================================= - Copyright (c) 2016 Kohei Takahashi + Copyright (c) 2016-2018 Kohei Takahashi 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) ==============================================================================*/ - -#include -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #include #include #include @@ -52,7 +48,7 @@ int main() } // Older MSVCs don't generate move ctor by default. -#if !(defined(RUNNING_ON_APPVEYOR) && BOOST_WORKAROUND(BOOST_MSVC, < 1900)) +#if !(defined(CI_SKIP_KNOWN_FAILURE) && BOOST_WORKAROUND(BOOST_MSVC, < 1900)) { ns::value x; ns::value y(std::move(x)); // move @@ -70,15 +66,8 @@ int main() BOOST_TEST(x.w.value == 0); BOOST_TEST(y.w.value == 0); } -#endif // !(appveyor && msvc < 14.0) +#endif // !(ci && msvc < 14.0) return boost::report_errors(); } -#else - -int main() -{ -} - -#endif diff --git a/test/sequence/define_tpl_struct_move.cpp b/test/sequence/define_tpl_struct_move.cpp index 127e5ce0..c4dd9ab6 100644 --- a/test/sequence/define_tpl_struct_move.cpp +++ b/test/sequence/define_tpl_struct_move.cpp @@ -1,13 +1,9 @@ /*============================================================================= - Copyright (c) 2016 Kohei Takahashi + Copyright (c) 2016,2018 Kohei Takahashi 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) ==============================================================================*/ - -#include -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #include #include #include @@ -68,10 +64,3 @@ int main() return boost::report_errors(); } -#else - -int main() -{ -} - -#endif diff --git a/test/sequence/deque_move.cpp b/test/sequence/deque_move.cpp index c1f126eb..b3675b24 100644 --- a/test/sequence/deque_move.cpp +++ b/test/sequence/deque_move.cpp @@ -1,16 +1,11 @@ /*============================================================================= Copyright (c) 2012 Joel de Guzman + Copyright (c) 2018 Kohei Takahashi 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) ==============================================================================*/ #define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ - - -#include - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - #include #define FUSION_SEQUENCE boost::fusion::deque> @@ -18,16 +13,9 @@ #include "move.hpp" -#else -#include -#endif - -int -main() +int main() { -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) test(); -#endif return boost::report_errors(); } diff --git a/test/sequence/map_move.cpp b/test/sequence/map_move.cpp index 77154406..fcac58aa 100644 --- a/test/sequence/map_move.cpp +++ b/test/sequence/map_move.cpp @@ -1,15 +1,11 @@ /*============================================================================= Copyright (c) 2012 Joel de Guzman + Copyright (c) 2018 Kohei Takahashi 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) ==============================================================================*/ #define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ - -#include - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - #include struct k1 {}; @@ -23,16 +19,9 @@ struct k2 {}; #include "move.hpp" -#else -#include -#endif - -int -main() +int main() { -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) test(); -#endif return boost::report_errors(); } diff --git a/test/sequence/vector_move.cpp b/test/sequence/vector_move.cpp index 3f96d72a..4e5ae7c8 100644 --- a/test/sequence/vector_move.cpp +++ b/test/sequence/vector_move.cpp @@ -1,15 +1,11 @@ /*============================================================================= Copyright (c) 2012 Joel de Guzman + Copyright (c) 2018 Kohei Takahashi 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) ==============================================================================*/ #define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ - -#include - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - #include #define FUSION_SEQUENCE boost::fusion::vector> @@ -17,16 +13,9 @@ #include "move.hpp" -#else -#include -#endif - -int -main() +int main() { -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) test(); -#endif return boost::report_errors(); } diff --git a/test/support/and.cpp b/test/support/and.cpp index 99ecd9f4..b657ead5 100644 --- a/test/support/and.cpp +++ b/test/support/and.cpp @@ -1,12 +1,15 @@ /*============================================================================= Copyright (c) 2016 Lee Clagett + Copyright (c) 2018 Kohei Takahashi 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) ==============================================================================*/ #include -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES +# error "does not meet requirements" +#endif #include #include @@ -29,5 +32,3 @@ int main() { return boost::report_errors(); } -#endif - diff --git a/test/support/index_sequence.cpp b/test/support/index_sequence.cpp index f155a8c7..019ae474 100644 --- a/test/support/index_sequence.cpp +++ b/test/support/index_sequence.cpp @@ -1,12 +1,14 @@ /*============================================================================= - Copyright (c) 2015 Kohei Takahashi + Copyright (c) 2015,2018 Kohei Takahashi 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) ==============================================================================*/ #include -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES +# error "does not meet requirements" +#endif #include #include @@ -28,5 +30,3 @@ BOOST_MPL_ASSERT((boost::is_same::type, detail:: BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15> >)); BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16> >)); -#endif -