Commit b23f2def authored by Dominik Charousset's avatar Dominik Charousset

Fix args to run_program in unit tests and add -n

parent 82806014
...@@ -177,8 +177,8 @@ void run_server(bool spawn_client, const char* bin_path) { ...@@ -177,8 +177,8 @@ void run_server(bool spawn_client, const char* bin_path) {
[&](uint16_t port) { [&](uint16_t port) {
CAF_MESSAGE("server is running on port " << port); CAF_MESSAGE("server is running on port " << port);
if (spawn_client) { if (spawn_client) {
auto child = detail::run_program(self, bin_path, "-s broker -- -c", auto child = detail::run_program(self, bin_path, "-n", "-s", "broker",
port); "--", "-c", port);
CAF_MESSAGE("block till child process has finished"); CAF_MESSAGE("block till child process has finished");
child.join(); child.join();
} }
......
...@@ -454,8 +454,8 @@ void test_remote_actor(const char* app_path, bool run_remote_actor) { ...@@ -454,8 +454,8 @@ void test_remote_actor(const char* app_path, bool run_remote_actor) {
CAF_CHECK(serv == serv2); CAF_CHECK(serv == serv2);
thread child; thread child;
if (run_remote_actor) { if (run_remote_actor) {
child = detail::run_program(self, app_path, "-s remote_actor -- -c ", port2, child = detail::run_program(self, app_path, "-n", "-s", "remote_actor",
port1, gport); "--", "-c", port2, port1, gport);
} else { } else {
CAF_MESSAGE("please run client with: " CAF_MESSAGE("please run client with: "
<< "-c " << port2 << " " << port1 << " " << gport); << "-c " << port2 << " " << port1 << " " << gport);
......
...@@ -115,8 +115,9 @@ CAF_TEST(test_typed_remote_actor) { ...@@ -115,8 +115,9 @@ CAF_TEST(test_typed_remote_actor) {
// execute client_part() in a separate process, // execute client_part() in a separate process,
// connected via localhost socket // connected via localhost socket
scoped_actor self; scoped_actor self;
auto child = detail::run_program(self, caf::test::engine::path(), auto child = detail::run_program(self, caf::test::engine::path(), "-n",
"-s typed_remote_actor -- -c", port); "-s", "typed_remote_actor",
"--", "-c", port);
CAF_MESSAGE("block till child process has finished"); CAF_MESSAGE("block till child process has finished");
child.join(); child.join();
self->await_all_other_actors_done(); self->await_all_other_actors_done();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment