Skip to content

Commit

Permalink
Force-activate verbose logging on the CI build agent
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 23, 2021
1 parent 2a2aa6d commit a2eb8f1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions test/RadiantTest.h
Expand Up @@ -20,6 +20,17 @@
namespace test
{

namespace
{
// Get an environment variable as a string (because getenv() can return nullptr
// and it is not safe to construct a string from a nullptr)
inline std::string strenv(const std::string& key)
{
const char* v = getenv(key.c_str());
return v ? std::string(v) : std::string();
}
}

/**
* Test fixture setting up the application context and
* the radiant core module.
Expand Down Expand Up @@ -147,8 +158,11 @@ class RadiantTest :
_testLogFile.reset(new TestLogFile(fullPath));
_coreModule->get()->getLogWriter().attach(_testLogFile.get());

_consoleLogger.reset(new ConsoleLogger);
_coreModule->get()->getLogWriter().attach(_consoleLogger.get());
//if (strenv("DR_VERBOSE_TEST_LOG") != "")
{
_consoleLogger.reset(new ConsoleLogger);
_coreModule->get()->getLogWriter().attach(_consoleLogger.get());
}
}

virtual void setupGameFolder()
Expand Down

0 comments on commit a2eb8f1

Please sign in to comment.