Skip to content

Commit

Permalink
Fix link and build of deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Aug 8, 2024
1 parent 680929e commit 5752006
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
3 changes: 2 additions & 1 deletion build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ project : requirements
: common-requirements
<library>$(boost_dependencies)
<boost.process.fs>std:<define>BOOST_PROCESS_USE_STD_FS=1
<boost.process.fs>boost:<library>/boost/filesystem//boost_filesystem
;

alias process_sources
Expand Down Expand Up @@ -51,10 +50,12 @@ lib boost_process
: process_sources
: requirements <define>BOOST_PROCESS_SOURCE=1
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost/filesystem//boost_filesystem
<target-os>windows:<library>shell32
<target-os>windows:<library>user32
<target-os>windows:<library>ntdll
<target-os>windows:<library>advapi32
: usage-requirements
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost/filesystem//boost_filesystem
;
18 changes: 9 additions & 9 deletions test/v1/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ project : requirements
import testing ;


alias program_options : /boost/program_options//boost_program_options : <link>static ;
alias filesystem : /boost/filesystem//boost_filesystem ;
alias iostreams : /boost/iostreams//boost_iostreams ;
alias system : /boost/system//boost_system ;
alias thread : /boost/thread//boost_thread ;
alias coroutine : /boost/coroutine//boost_coroutine : <link>static ;
alias scope_exit : /boost/scope_exit//boost_scope_exit ;
alias lambda : /boost/lambda//boost_lambda ;
alias chrono : /boost/chrono//boost_chrono ;
alias program_options : usage-requirements <library>/boost/program_options//boost_program_options ;
alias filesystem : usage-requirements <library>/boost/filesystem//boost_filesystem ;
alias iostreams : usage-requirements <library>/boost/iostreams//boost_iostreams ;
alias system : usage-requirements <library>/boost/system//boost_system ;
alias thread : usage-requirements <library>/boost/thread//boost_thread ;
alias coroutine : usage-requirements <library>/boost/coroutine//boost_coroutine ;
alias scope_exit : usage-requirements <library>/boost/scope_exit//boost_scope_exit ;
alias lambda : usage-requirements <library>/boost/lambda//boost_lambda ;
alias chrono : usage-requirements <library>/boost/chrono//boost_chrono ;

lib multi_ref : multi_ref1.cpp multi_ref2.cpp system : <target-os>windows:<source>shell32 ;

Expand Down
4 changes: 1 addition & 3 deletions test/v2/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ project : requirements
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>Bcrypt
<define>BOOST_PROCESS_V2_SEPARATE_COMPILATION=1
<link>static
<library>/boost/test//included
;

Expand All @@ -39,10 +38,9 @@ exe target : target.cpp :
<target-os>windows:<source>Ntdll
;

lib test_impl : test_impl.cpp /boost/filesystem//boost_filesystem /boost/process//boost_process :
lib test_impl : test_impl.cpp /boost/process//boost_process :
<define>BOOST_PROCESS_V2_SEPARATE_COMPILATION=1
<define>BOOST_TEST_IGNORE_SIGCHLD=1
<link>static
;

test-suite standalone :
Expand Down
17 changes: 7 additions & 10 deletions test/v2/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#define BOOST_ALL_NO_LIB 1
#endif // !defined(BOOST_ALL_NO_LIB)

#if defined(BOOST_FILESYSTEM_DYN_LINK)
#undef BOOST_FILESYSTEM_DYN_LINK
#endif
#define BOOST_TEST_IGNORE_SIGCHLD 1

#if true //defined(BOOST_POSIX_API)
Expand Down Expand Up @@ -55,9 +52,9 @@ BOOST_AUTO_TEST_CASE(exit_code_sync)
{
using boost::unit_test::framework::master_test_suite;
const auto pth = master_test_suite().argv[1];

boost::asio::io_context ctx;

BOOST_CHECK_EQUAL(bpv::process(ctx, pth, {"exit-code", "0"}).wait(), 0);
BOOST_CHECK_EQUAL(bpv::execute(bpv::process(ctx, pth, {"exit-code", "1"})), 1);
std::vector<std::string> args = {"exit-code", "2"};
Expand Down Expand Up @@ -85,7 +82,7 @@ BOOST_AUTO_TEST_CASE(exit_code_async)

int called = 0;
printf("Setting up processes\n");

bpv::process proc1(ctx, pth, {"exit-code", "0"});
bpv::process proc3(ctx, pth, {"exit-code", "2"});
bpv::process proc4(ctx, pth, {"exit-code", "42"});
Expand Down Expand Up @@ -200,7 +197,7 @@ BOOST_AUTO_TEST_CASE(print_args_out)
{
using boost::unit_test::framework::master_test_suite;
const auto pth = master_test_suite().argv[1];

asio::io_context ctx;

asio::readable_pipe rp{ctx};
Expand Down Expand Up @@ -296,7 +293,7 @@ BOOST_AUTO_TEST_CASE(echo_file)
{
using boost::unit_test::framework::master_test_suite;
const auto pth = master_test_suite().argv[1];

asio::io_context ctx;

asio::readable_pipe rp{ctx};
Expand Down Expand Up @@ -476,7 +473,7 @@ BOOST_AUTO_TEST_CASE(environment)

sub_env.push_back("FOOBAR=FOO-BAR");
BOOST_CHECK_EQUAL("FOO-BAR", read_env("FOOBAR", bpv::process_environment{sub_env}));

sub_env.push_back("XYZ=ZYX");
auto itr = std::find_if(sub_env.begin(), sub_env.end(), [](const bpv::environment::key_value_pair & kv) {return kv.key() == bpv::environment::key("PATH");});
path += static_cast<char>(bpv::environment::delimiter);
Expand Down Expand Up @@ -511,7 +508,7 @@ BOOST_AUTO_TEST_CASE(exit_code_as_error)
bpv::process proc3(ctx, pth, {"sleep", "2000"});

int called = 0;

proc3.terminate();


Expand Down
4 changes: 0 additions & 4 deletions test/v2/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
#define BOOST_ALL_NO_LIB 1
#endif // !defined(BOOST_ALL_NO_LIB)

#if defined(BOOST_FILESYSTEM_DYN_LINK)
#undef BOOST_FILESYSTEM_DYN_LINK
#endif

// Test that header file is self-contained.
#include <boost/process/v2/process.hpp>

Expand Down

0 comments on commit 5752006

Please sign in to comment.