]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/uuid/test/Jamfile.v2
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / uuid / test / Jamfile.v2
index 476bd3946b0a4940065d266cbdfa6f9749bb70da..f96ca14ffc77686823fd11a1b20cd15ea18fc6f5 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 2007 Andy Tompkins.
-# Copyright 2017 James E. King III
+# Copyright 2017 - 2018 James E. King III
 # 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)
+# https://www.boost.org/LICENSE_1_0.txt)
 
 lib bcrypt ;
 
@@ -51,6 +51,16 @@ rule test_all
         all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_UUID_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
     }
 
+    local tests_path = [ path.make $(BOOST_ROOT)/libs/uuid/test/compile-fail ] ;
+    for file in [ path.glob-tree $(tests_path) : *.cpp ]
+    {
+        local rel_file = [ path.relative-to $(tests_path) $(file) ] ;
+        local test_name = [ regex.replace [ regex.replace $(rel_file) "/" "-" ] ".cpp" "" ] ;
+        local decl_test_name = cf-$(test_name) ;
+        # ECHO $(rel_file) ;
+        all_rules += [ compile-fail $(file) : : $(decl_test_name) ] ;
+    }
+
     # make sure compile time options work in isolation
     all_rules += [ compile compile/decl_header.cpp :
         <define>"BOOST_UUID_TEST_HEADER=uuid.hpp"
@@ -101,6 +111,7 @@ test-suite uuid :
     # test generators
     [ run test_nil_generator.cpp ]
     [ run test_name_generator.cpp ]
+    [ run test_name_generator.cpp : : : <define>BOOST_UUID_COMPAT_PRE_1_71_MD5 : test_name_generator_pre_1_71_compat ]
     [ run test_string_generator.cpp ]
     [ run test_random_generator.cpp ]
 
@@ -112,7 +123,9 @@ test-suite uuid :
     [ run test_uuid_in_map.cpp ]
 
     # test hash functions
+    [ run test_hash.cpp ]
     [ run test_md5.cpp ]
+    [ run test_md5.cpp : : : <define>BOOST_UUID_COMPAT_PRE_1_71_MD5 : test_md5_pre_1_71_compat ]
     [ run test_sha1.cpp ]
 
     # test MSVC 12 (VS2013) optimizer bug with SIMD operations.
@@ -132,12 +145,14 @@ test-suite uuid :
     # and to make sure we test all the error handling code paths
     [ run test_detail_random_provider.cpp 
       : : :
+        <define>_WIN32_WINNT=0x0600                                     # will force bcrypt over wincrypt (on windows)
       : test_detail_random_provider_happy ]
     
     [ run test_detail_random_provider.cpp
       : : :
         <define>BOOST_UUID_RANDOM_PROVIDER_NO_LIB                       # disable any auto-linking
         <define>BOOST_UUID_TEST_RANDOM_MOCK                             # mock default provider to force error path testing
+        <define>_WIN32_WINNT=0x0600                                     # will force bcrypt over wincrypt (on windows)
       :
         test_detail_random_provider_sad ]
 
@@ -166,22 +181,39 @@ test-suite uuid :
         <target-os>windows:<build>yes                                   # except for windows
       : test_detail_random_provider_sad_wincrypt ]
 
-    # CI builds in travis will eventually select getentropy when they move
+    # CI builds in travis will eventually select getrandom/getentropy when they move
     # to a version of ubuntu with glibc-2.25 on it, so when that happens keep 
     # testing the posix provider:
-    [ run test_detail_random_provider.cpp 
+    [ run test_detail_random_provider.cpp
       : : :
-        <define>BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX                  # will force POSIX over getentropy
+        <define>BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX                  # will force POSIX over getrandom/getentropy
         <target-os>windows:<build>no                                    # do not bother running on windows
         <toolset>clang-cloudabi:<build>no                               # no need to build under cloudabi
       : test_detail_random_provider_happy_posix ]
 
-    [ run test_detail_random_provider.cpp 
+    [ run test_detail_random_provider.cpp
       : : :
-        <define>BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX                  # will force POSIX over getentropy
+        <define>BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX                  # will force POSIX over getrandom/getentropy
         <define>BOOST_UUID_TEST_RANDOM_MOCK                             # redirect code to use mock system calls
         <target-os>windows:<build>no                                    # do not bother running on windows
         <toolset>clang-cloudabi:<build>no                               # no need to build under cloudabi
       : test_detail_random_provider_sad_posix ]
 
+    # Force running tests for getentropy despite it's not going to be used on Linux. getentropy
+    # may be used on systems other than Linux, which are not part of the CI testers pool.
+    [ run test_detail_random_provider.cpp
+      : : :
+        <define>BOOST_UUID_RANDOM_PROVIDER_DISABLE_GETRANDOM            # will force getentropy over getrandom
+        <build>no
+        <target-os>linux:<build>yes                                     # build only on linux (or any other systems that support getentropy)
+      : test_detail_random_provider_happy_getentropy ]
+
+    [ run test_detail_random_provider.cpp
+      : : :
+        <define>BOOST_UUID_RANDOM_PROVIDER_DISABLE_GETRANDOM            # will force getentropy over getrandom
+        <define>BOOST_UUID_TEST_RANDOM_MOCK                             # redirect code to use mock system calls
+        <build>no
+        <target-os>linux:<build>yes                                     # build only on linux (or any other systems that support getentropy)
+      : test_detail_random_provider_sad_getentropy ]
+
     ;