Skip to content

Commit

Permalink
Fix: Pass empty path for USTORE_FLIGHT_CLIENT
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgenyegoryan committed Aug 16, 2023
1 parent 07c9400 commit 8b01879
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/test_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,15 @@ static json_t json_parse(char const* begin, char const* end) {
EXPECT_EQ(json_t::from_msgpack(str_begin(str1), str_end(str1)), json_parse(str_begin(str2), str_end(str2)));

static char const* path() {
// #if defined(USTORE_FLIGHT_CLIENT)
// return nullptr;
// #endif
#if defined(USTORE_FLIGHT_CLIENT)
return nullptr;
#endif

char* path = std::getenv("USTORE_TEST_PATH");
if (path)
return std::strlen(path) ? path : nullptr;

#if defined(USTORE_FLIGHT_CLIENT)
return nullptr;
#elif defined(USTORE_TEST_PATH)
#if defined(USTORE_TEST_PATH)
return USTORE_TEST_PATH;
#else
return nullptr;
Expand Down Expand Up @@ -2284,7 +2283,6 @@ int main(int argc, char** argv) {
if (srv_id == 0) {
usleep(1); // TODO Any statement is required to be run for successful `execl` run...
std::string cli_args = "--quiet" + (path() ? fmt::format(" --config {}", path()) : "");
fmt::print("{}\n", cli_args);
execl(srv_path.c_str(), srv_path.c_str(), cli_args.c_str(), (char*)(NULL));
exit(0);
}
Expand Down

0 comments on commit 8b01879

Please sign in to comment.