Skip to content

Commit

Permalink
tests: evaluate REGRESS_DEBUG in messages test
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Feb 10, 2020
1 parent 3800ebc commit ffbf368
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/tests/messages.cc
Expand Up @@ -95,16 +95,19 @@ static bool DbLogInsertCallback_(JobControlRecord* jcr,

TEST(messages, send_message_to_all_configured_destinations)
{
debug_level = 200;

std::string config_dir = getenv_std_string("BAREOS_CONFIG_DIR");
std::string working_dir = getenv_std_string("BAREOS_WORKING_DIR");
std::string backend_dir = getenv_std_string("backenddir");
std::string regress_debug = getenv_std_string("REGRESS_DEBUG");

ASSERT_FALSE(working_dir.empty());
ASSERT_FALSE(config_dir.empty());
ASSERT_FALSE(backend_dir.empty());

if (!regress_debug.empty()) {
if (regress_debug == "1") { debug_level = 200; }
}

SetWorkingDirectory(working_dir.c_str());
InitConsoleMsg(working_dir.c_str());
RegisterSyslogCallback(SyslogCallback_);
Expand Down

0 comments on commit ffbf368

Please sign in to comment.