summaryrefslogtreecommitdiff
path: root/indra/test/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test/test.cpp')
-rw-r--r--indra/test/test.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 9d24383bcc..8df404f16b 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -181,13 +181,16 @@ public:
virtual void run_started()
{
//std::cout << "run_started" << std::endl;
+ LL_INFOS("TestRunner")<<"Test Started"<< LL_ENDL;
}
virtual void group_started(const std::string& name) {
+ LL_INFOS("TestRunner")<<"Unit test group_started name=" << name << LL_ENDL;
*mStream << "Unit test group_started name=" << name << std::endl;
}
virtual void group_completed(const std::string& name) {
+ LL_INFOS("TestRunner")<<"Unit test group_completed name=" << name << LL_ENDL;
*mStream << "Unit test group_completed name=" << name << std::endl;
}
@@ -245,9 +248,11 @@ public:
if(!tr.message.empty())
{
*mStream << ": '" << tr.message << "'";
+ LL_WARNS("TestRunner") << "not ok : "<<tr.message << LL_ENDL;
}
*mStream << std::endl;
}
+ LL_INFOS("TestRunner")<<out.str()<<LL_ENDL;
}
virtual int getFailedTests() const { return mFailedTests; }
@@ -477,9 +482,9 @@ int main(int argc, char **argv)
#ifndef LL_WINDOWS
::testing::InitGoogleMock(&argc, argv);
#endif
- LLError::initForApplication(".");
+ LLError::initForApplication(".", false /* do not log to stderr */);
LLError::setFatalFunction(wouldHaveCrashed);
- LLError::setDefaultLevel(LLError::LEVEL_ERROR);
+ LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
// ^ possibly overridden by --debug, LOGTEST or LOGFAIL
// LOGTEST overrides default, but can be overridden by --debug or LOGFAIL.
@@ -488,6 +493,12 @@ int main(int argc, char **argv)
{
LLError::setDefaultLevel(LLError::decodeLevel(LOGTEST));
}
+ LLError::setPrintLocation(true);
+ std::string test_app_name(argv[0]);
+ std::string test_log = test_app_name + ".log";
+ LLFile::remove(test_log);
+ LLError::logToFile(test_log);
+
#ifdef CTYPE_WORKAROUND
ctype_workaround();