2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00
Files
uuid/test/Jamfile.v2
2024-04-23 04:42:50 +03:00

140 lines
4.1 KiB
Plaintext

# Copyright 2007 Andy Tompkins.
# Copyright 2017 - 2022 James E. King III
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
project
: requirements
<warnings>pedantic
;
import os ;
import path ;
import regex ;
import testing ;
# this rule enumerates through all the headers and ensures
# that inclusion of the header by itself is sufficient to
# compile successfully, proving the header does not depend
# on any other headers to be included first - adapted from
# logic in the winapi test bjam script
path-constant HERE : . ;
rule test_headers
{
local all_rules = ;
local file ;
local headers_path = [ path.make $(HERE)/../include/boost/uuid ] ;
for file in [ path.glob-tree $(headers_path) : *.hpp : uuid ]
{
local rel_file = [ path.relative-to $(headers_path) $(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 $(rel_file) "/" "-" ] ;
local decl_test_name = ~hdr-decl-$(test_name) ;
# ECHO $(rel_file) ;
all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_UUID_TEST_HEADER=$(rel_file)" <dependency>$(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"
<define>"BOOST_UUID_NO_TYPE_TRAITS"
<dependency>../include/boost/uuid/uuid.hpp :
compile_uuid_no_type_traits ] ;
all_rules += [ compile compile/decl_header.cpp :
<define>"BOOST_UUID_TEST_HEADER=uuid.hpp"
<define>"BOOST_UUID_NO_SIMD"
<dependency>../include/boost/uuid/uuid.hpp :
compile_uuid_no_simd ] ;
# ECHO All rules: $(all_rules) ;
return $(all_rules) ;
}
alias test_headers : [ test_headers ] ;
# test inclucing all .hpp files in 2 translations units
# to look for issues when using multiple translation units
# eg. missing inline on a global functionstate is not missing
run test_include1.cpp test_include2.cpp ;
# main test
run test_uuid.cpp ;
run test_uuid.cpp : : : <define>BOOST_UUID_NO_SIMD : test_uuid_no_simd_2 ;
run test_uuid_no_simd.cpp ;
# test comparison
run test_comparison.cpp ;
run test_comparison.cpp : : : <define>BOOST_UUID_NO_SIMD : test_comparison_no_simd ;
# test uuid_io.hpp
run test_io.cpp ;
# test generators
run test_nil_generator.cpp ;
run test_name_generator.cpp ;
run test_string_generator.cpp ;
run test_random_generator.cpp ;
# test serializing uuids
run test_serialization.cpp /boost//serialization : : : <undefined-sanitizer>norecover:<link>static ;
# run test_wserialization.cpp /boost//serialization /boost//wserialization ;
# test tagging an object
run test_tagging.cpp ;
# test use cases
run test_uuid_class.cpp ;
run test_uuid_in_map.cpp ;
# test hashing support
run test_hash.cpp ;
run test_hash_value.cpp ;
run test_std_unordered.cpp ;
run test_boost_unordered.cpp
: : : <toolset>gcc-4.7:<build>no ;
# test detail components
run test_detail_md5.cpp ;
run test_detail_sha1.cpp ;
run test_detail_endian.cpp ;
run test_detail_chacha20.cpp ;
# compile-fail tests
compile-fail compile-fail/random_provider_no_copy_ctor.cpp ;
compile-fail compile-fail/random_provider_no_copy_assign.cpp ;
# test MSVC 12 (VS2013) optimizer bug with SIMD operations.
# See https://svn.boost.org/trac/boost/ticket/8509#comment:3
# Only happens in Release x64 builds.
run test_msvc_simd_bug981648_main.cpp test_msvc_simd_bug981648_foo.cpp : : : <variant>release <debug-symbols>on : test_msvc_simd_bug981648 ;
# a small benchmark test for random generation
run test_bench_random.cpp /boost//timer : : : <toolset>clang-cloudabi:<build>no ;
# tests for the header-only random provider
run test_entropy_error.cpp ;
run test_detail_random_provider.cpp ;
# 'quick' test for CI
run quick.cpp ;