]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/winapi/test/Jamfile.v2
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / winapi / test / Jamfile.v2
CommitLineData
7c673cae
FG
1#
2# Copyright Andrey Semashev 2015.
3# Distributed under the Boost Software License, Version 1.0.
4# (See accompanying file LICENSE_1_0.txt or copy at
5# http://www.boost.org/LICENSE_1_0.txt)
6
7import testing ;
8import path ;
9import regex ;
10
11project
12 : requirements
13
14 # Disable warnings about using 'insecure' standard C functions
15 <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
16 <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
17 <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
18 <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
19 <toolset>intel-win:<define>_SCL_SECURE_NO_WARNINGS
20 <toolset>intel-win:<define>_SCL_SECURE_NO_DEPRECATE
21 <toolset>intel-win:<define>_CRT_SECURE_NO_WARNINGS
22 <toolset>intel-win:<define>_CRT_SECURE_NO_DEPRECATE
23
24 : default-build
25 # Testers typically don't specify threading environment and the library can be built and tested for single and multi. I'm more interested in multi though.
26 <threading>multi
27# <link>static
28 ;
29
30# this rule enumerates through all the sources and invokes
31# the run rule for each source, the result is a list of all
32# the run rules, which we can pass on to the test_suite rule:
33rule test_all
34{
35 local all_rules = ;
36 local file ;
b32b8144 37 local headers_path = [ path.make $(BOOST_ROOT)/libs/winapi/include/boost/winapi ] ;
7c673cae
FG
38 for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
39 {
b32b8144 40 local rel_file = [ path.relative-to [ path.parent $(headers_path) ] $(file) ] ;
7c673cae
FG
41 # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
42 # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
43 local test_name = [ regex.replace $(rel_file) "/" "-" ] ;
44 local decl_test_name = ~hdr-decl-$(test_name) ;
45 local use_winh_test_name = ~hdr-use-winh-$(test_name) ;
46 local pre_winh_test_name = ~hdr-pre-winh-$(test_name) ;
47 local post_winh_test_name = ~hdr-post-winh-$(test_name) ;
48 #ECHO $(rel_file) ;
49 all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
50 all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <define>"BOOST_USE_WINDOWS_H" <dependency>$(file) : $(use_winh_test_name) ] ;
51 all_rules += [ compile compile/windows_h_pre.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(pre_winh_test_name) ] ;
52 all_rules += [ compile compile/windows_h_post.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(post_winh_test_name) ] ;
53 }
54
b32b8144
FG
55 headers_path = [ path.make $(BOOST_ROOT)/libs/winapi/include/boost/detail ] ;
56 for file in [ path.glob $(headers_path) : *.hpp : detail ]
57 {
58 local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
59 local test_name = [ regex.replace $(rel_file) "/" "-" ] ;
60 local decl_test_name = ~hdr-decl-$(test_name) ;
61 local use_winh_test_name = ~hdr-use-winh-$(test_name) ;
62 local pre_winh_test_name = ~hdr-pre-winh-$(test_name) ;
63 local post_winh_test_name = ~hdr-post-winh-$(test_name) ;
64 #ECHO $(rel_file) ;
65 all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_WINAPI_TEST_HEADER=detail/$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
66 all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_WINAPI_TEST_HEADER=detail/$(rel_file)" <define>"BOOST_USE_WINDOWS_H" <dependency>$(file) : $(use_winh_test_name) ] ;
67 all_rules += [ compile compile/windows_h_pre.cpp : <define>"BOOST_WINAPI_TEST_HEADER=detail/$(rel_file)" <dependency>$(file) : $(pre_winh_test_name) ] ;
68 all_rules += [ compile compile/windows_h_post.cpp : <define>"BOOST_WINAPI_TEST_HEADER=detail/$(rel_file)" <dependency>$(file) : $(post_winh_test_name) ] ;
69 }
70
71 for file in [ glob run/*.cpp ]
72 {
73 all_rules += [ run $(file) : : : <test-info>always_show_run_output ] ;
74 }
75
7c673cae
FG
76 #ECHO All rules: $(all_rules) ;
77 return $(all_rules) ;
78}
79
80test-suite winapi : [ test_all r ] ;