Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions libs/test/foolproof/scaffold/Provisioning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ class RunClient {
BOOST_REQUIRE_MESSAGE(cwd != nullptr, "The working directory is non-null");

auto client_path = find_ecflow_client_path();
ECF_TEST_DBG("----> found client at " << client_path.string());

BOOST_REQUIRE_MESSAGE(!client_path.empty(), "The ecflow client path is non-empty");
BOOST_REQUIRE_MESSAGE(fs::exists(client_path), "The ecflow client executable exist at " << client_path);
Expand All @@ -858,8 +859,15 @@ class RunClient {
options.push_back(option);
}

ECF_TEST_DBG("----> using options:");
for (const auto& option : options) {
ECF_TEST_DBG(" " << option);
}

auto ecflow_client = Process(client_path, options, cwd->path());

ECF_TEST_DBG("----> process started with pid: " << ecflow_client.pid());

auto print = [](const auto& executable, const auto& options) {
std::string buffer = "[ " + pretty_print_path(executable) + (options.empty() ? "" : ", ");
for (size_t i = 0; i < options.size(); ++i) {
Expand All @@ -871,6 +879,8 @@ class RunClient {
return buffer + " ]";
};

ECF_TEST_DBG("----> waiting next!");

if (auto r = ecflow_client.wait(); r == 0) {
ECF_TEST_DBG("Executed " << print(client_path, options));
ECF_TEST_DBG(" result: [OK]");
Expand Down Expand Up @@ -1105,6 +1115,7 @@ class MakeServer {
std::chrono::seconds timeout = std::chrono::seconds(10)) {
auto start = std::chrono::system_clock::now();
for (;;) {
ECF_TEST_DBG("----> pinging!!!");
auto r = RunClient{}.with(host).with(port).with(cwd).execute(RunClient::CommandPing{});
if (r.ok()) {
// Important: this checks that the client finished with SUCCESS!
Expand Down
Loading