1# Copyright (c) 2006, 2007 Julio M. Merino Vidal
2# Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3# Copyright (c) 2009 Boris Schaeling
4# Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5# Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
6# Copyright (c) 2016 Klemens D. Morgenstern
7#
8# Distributed under the Boost Software License, Version 1.0. (See accompanying
9# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10
11
12import os ;
13
14if [ os.name ] = NT
15{
16  lib ws2_32 ;
17  lib shell32 ;
18  lib Advapi32 ;
19  lib Ntdll ;
20}
21
22project : requirements
23  <define>BOOST_ASIO_NO_DEPRECATED
24  <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
25  <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
26  <toolset>msvc:<cxxflags>/bigobj
27  <target-os>windows:<define>WIN32_LEAN_AND_MEAN
28  <target-os>linux:<linkflags>-lpthread
29  <os>NT,<toolset>cw:<library>ws2_32
30  <os>NT,<toolset>gcc:<library>ws2_32
31;
32
33
34
35import testing ;
36
37
38alias program_options  : /boost//program_options : <link>static ;
39alias filesystem       : /boost//filesystem      ;
40alias iostreams        : /boost//iostreams       ;
41alias system           : /boost//system          ;
42alias thread           : /boost//thread          ;
43alias coroutine        : /boost//coroutine       : <link>static ;
44
45lib multi_ref : multi_ref1.cpp multi_ref2.cpp system : <target-os>windows:<source>shell32 ;
46
47exe sparring_partner : sparring_partner.cpp program_options system filesystem iostreams :
48    <warnings>off <target-os>windows:<source>shell32 <target-os>windows:<source>Ntdll
49    ;
50
51exe exit_argc : exit_argc.cpp :
52    <warnings>off <target-os>windows:<source>shell32
53    ;
54
55exe sub_launch : sub_launcher.cpp program_options iostreams system filesystem : <warnings>off <target-os>windows:<source>shell32 ;
56
57rule test-options ( name )
58{
59    if "--boost-process-report-ci" in [ modules.peek : ARGV ]
60    {
61        return --log_sink=log_$(name).xml --log_format=XML --log_level=error --report_sink=report_$(name).xml --report_format=XML --report_level=detailed -- ;
62    }
63    else
64    {
65        return --log_level=error --report_level=detailed -- ;
66    }
67
68}
69
70
71test-suite bare :
72    [ run environment.cpp system filesystem : [ test-options environment ] ]
73    [ run async_pipe.cpp  system filesystem : [ test-options async_pipe ] ]
74    [ run pipe.cpp        system filesystem : [ test-options pipe ] ]
75    [ compile no_ansi_apps.cpp ]
76    [ compile-fail spawn_fail.cpp        ]
77    [ compile-fail async_system_fail.cpp ]
78    [ compile asio_no_deprecated.cpp ]
79    ;
80
81test-suite with-valgrind :
82    [ run async.cpp       system thread filesystem            : [ test-options async ] : sparring_partner ]
83    [ run async_fut.cpp   system thread filesystem            : [ test-options async_fut ] : sparring_partner ]
84    [ run args_handling.cpp  system thread filesystem         : [ test-options args_handling ] : exit_argc ]
85    [ run args_cmd.cpp    system filesystem                   : [ test-options args_cmd ] : sparring_partner ]
86    [ run wargs_cmd.cpp    system filesystem                  : [ test-options wargs_cmd ] : sparring_partner ]
87    [ run bind_stderr.cpp     filesystem                      : [ test-options bind_stderr ] : sparring_partner ]
88    [ run bind_stdin.cpp     system filesystem                : [ test-options bind_stdin ] : sparring_partner ]
89    [ run bind_stdin_stdout.cpp     system filesystem         : [ test-options bind_stdin_stdout ] : sparring_partner ]
90    [ run bind_stdout.cpp     system filesystem               : [ test-options bind_stdout ] : sparring_partner ]
91    [ run bind_stdout_stderr.cpp     system filesystem        : [ test-options bind_stdout_stderr ] : sparring_partner ]
92    [ run pipe_fwd.cpp         system filesystem              : [ test-options pipe_fwd ] : sparring_partner ]
93    [ run cmd_test.cpp         system filesystem              : [ test-options cmd_test ] : sparring_partner ]
94    [ run close_stderr.cpp     system filesystem              : [ test-options close_stderr ] : sparring_partner ]
95    [ run close_stdin.cpp      system filesystem              : [ test-options close_stdin ] : sparring_partner ]
96    [ run close_stdout.cpp     system filesystem              : [ test-options close_stdout ] : sparring_partner ]
97    [ run error.cpp            system filesystem              : [ test-options error ] : sparring_partner ]
98    [ run exit_code.cpp program_options system filesystem     : [ test-options exit_code ] : sparring_partner ]
99    [ run extensions.cpp system filesystem                    : [ test-options extensions ] : sparring_partner ]
100    [ run env.cpp     program_options system filesystem       : [ test-options env ] : sparring_partner ]
101    [ run group.cpp     system thread filesystem              : [ test-options group ] : sub_launch ]
102    [ run group.cpp          system thread filesystem         : [ test-options group ] : sub_launch : <build>no <target-os>windows:<build>yes <define>BOOST_USE_WINDOWS_H=1 : group-windows-h ]
103    [ run group_wait.cpp     system thread filesystem         : [ test-options group_wait ] : sparring_partner ]
104	[ run limit_fd.cpp     program_options system filesystem  : [ test-options limit_fd ] : sparring_partner ]
105    [ run run_exe.cpp filesystem                              : : sparring_partner ]
106    [ run run_exe_path.cpp filesystem                         : [ test-options run_exe_path ] : sparring_partner ]
107    [ run search_path.cpp filesystem system                   : [ test-options search_path ] : : <target-os>windows:<source>shell32 ]
108    [ run shell.cpp filesystem system                         : [ test-options shell ] : sparring_partner ]
109    [ run shell_path.cpp  filesystem system                   : [ test-options shell_path ] ]
110    [ run system_test1.cpp filesystem system                  : [ test-options system_test1 ] : sparring_partner ]
111    [ run system_test2.cpp filesystem system                  : [ test-options system_test2 ] : sparring_partner ]
112    [ run spawn.cpp filesystem system                         : [ test-options spawn ] : sparring_partner ]
113    [ run start_dir.cpp   filesystem system                   : [ test-options start_dir ] : sparring_partner ]
114    [ run terminate.cpp system filesystem                     : [ test-options terminate ] : sparring_partner ]
115    [ run throw_on_error.cpp system filesystem                : [ test-options throw_on_error ] : sparring_partner ]
116    [ run wait.cpp system filesystem                          : [ test-options wait ] : sparring_partner ]
117    [ run wait_for.cpp system filesystem                      : [ test-options wait_for ] : sparring_partner ]
118    [ run on_exit.cpp  system filesystem                      : [ test-options on_exit ] : sparring_partner ]
119    [ run on_exit2.cpp system filesystem                      : [ test-options on_exit2 ] : sparring_partner ]
120    [ run on_exit3.cpp system filesystem                      : [ test-options on_exit3 ] : sparring_partner ]
121    [ run posix_specific.cpp     system filesystem            : [ test-options posix_specific ] : sparring_partner : <build>no <target-os>linux:<build>yes   ]
122    [ run windows_specific.cpp filesystem system              : [ test-options windows_specific ] : sparring_partner : <build>no <target-os>windows:<build>yes   ]
123   : <dependency>bare ;
124
125test-suite without-valgrind :
126    [ run async_system_future.cpp filesystem system coroutine           : [ test-options async_system_future ] : sparring_partner : <link>static <toolset>msvc:<cxxflags>/bigobj ]
127    [ run async_system_stackful.cpp filesystem system coroutine         : [ test-options async_system_stackful ] : sparring_partner : <link>static <toolset>msvc:<cxxflags>/bigobj ]
128    [ run async_system_stackful_error.cpp filesystem system coroutine   : [ test-options async_system_stackful_error ] : sparring_partner : <link>static <toolset>msvc:<cxxflags>/bigobj ]
129    [ run async_system_stackful_except.cpp filesystem system coroutine  : [ test-options async_system_stackful_except ] : sparring_partner : <link>static <toolset>msvc:<cxxflags>/bigobj ]
130    [ run async_system_stackless.cpp filesystem system coroutine        : [ test-options async_system_stackless ] : sparring_partner : <link>static <toolset>msvc:<cxxflags>/bigobj ]
131    [ run vfork.cpp     system filesystem                               : [ test-options vfork ] : sparring_partner : <build>no <target-os>linux:<build>yes ]
132    ;
133
134
135