From ee5a71be1091a4d71486fa5f7af1099c763684f2 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 15:15:14 -0700 Subject: clean commit of teamcity service message related changes of unit test reporting into a clean repo --- BuildParams | 9 + build.sh | 4 +- indra/test/test.cpp | 638 +++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 520 insertions(+), 131 deletions(-) diff --git a/BuildParams b/BuildParams index 9b5a9cfb3f..ab7e139b0a 100644 --- a/BuildParams +++ b/BuildParams @@ -173,4 +173,13 @@ oz_viewer-review1_coverity.build_CYGWIN_Debug = false oz_viewer-review1_coverity.build_CYGWIN_RelWithDebInfo = false oz_viewer-review1_coverity.build_CYGWIN_Release = false +# ======================================== +# enus +# ======================================== + +viewer-tut-teamcity.email = enus@lindenlab.com +viewer-tut-teamcity.build_server = false +viewer-tut-teamcity.build_server_tests = false + + # eof diff --git a/build.sh b/build.sh index 3903216246..878aa45ce3 100755 --- a/build.sh +++ b/build.sh @@ -222,7 +222,7 @@ do fi else begin_section "Build$variant" - build "$variant" "$build_dir" >> "$build_log" 2>&1 + build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | grep --line-buffered "^##teamcity" if `cat "$build_dir/build_ok"` then echo so far so good. @@ -251,7 +251,7 @@ then begin_section "Build$variant" build_dir=`build_dir_$arch $variant` build_dir_stubs="$build_dir/win_setup/$variant" - cat "$build_dir/build.log" >> "$build_log" + tee -a $build_log < "$build_dir/build.log" | grep --line-buffered "^##teamcity" if `cat "$build_dir/build_ok"` then echo so far so good. diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 57797f9d9f..d6959a2662 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -56,62 +56,75 @@ namespace tut { std::string sSourceDir; - + test_runner_singleton runner; } class LLTestCallback : public tut::callback { public: - LLTestCallback(bool verbose_mode, std::ostream *stream) : - mVerboseMode(verbose_mode), - mTotalTests(0), - mPassedTests(0), - mFailedTests(0), - mSkippedTests(0), - mStream(stream) + LLTestCallback(bool verbose_mode, std::ostream *stream, std::string suitename) : + mVerboseMode(verbose_mode), + mTotalTests(0), + mPassedTests(0), + mFailedTests(0), + mSkippedTests(0), + mStream(stream), + suite_name(suitename) { } - - void run_started() + + LLTestCallback() + { + } + + virtual void run_started() { //std::cout << "run_started" << std::endl; } - - void test_completed(const tut::test_result& tr) + + virtual void group_started(const std::string& name) { + std::cout << "group_started name=" << name << std::endl; + } + + virtual void group_completed(const std::string& name) { + std::cout << "group_completed name=" << name << std::endl; + } + + virtual void test_completed(const tut::test_result& tr) { ++mTotalTests; std::ostringstream out; out << "[" << tr.group << ", " << tr.test << "] "; switch(tr.result) { - case tut::test_result::ok: - ++mPassedTests; - out << "ok"; - break; - case tut::test_result::fail: - ++mFailedTests; - out << "fail"; - break; - case tut::test_result::ex: - ++mFailedTests; - out << "exception"; - break; - case tut::test_result::warn: - ++mFailedTests; - out << "test destructor throw"; - break; - case tut::test_result::term: - ++mFailedTests; - out << "abnormal termination"; - break; - case tut::test_result::skip: - ++mSkippedTests; - out << "skipped known failure"; - break; - default: - ++mFailedTests; - out << "unknown"; + case tut::test_result::ok: + ++mPassedTests; + out << "ok"; + break; + case tut::test_result::fail: + ++mFailedTests; + out << "fail"; + break; + case tut::test_result::ex: + ++mFailedTests; + out << "exception"; + break; + case tut::test_result::warn: + ++mFailedTests; + out << "test destructor throw"; + break; + case tut::test_result::term: + ++mFailedTests; + out << "abnormal termination"; + break; + case tut::test_result::skip: + ++mSkippedTests; + out << "skipped known failure"; + break; + default: + ++mFailedTests; + out << "unknown"; } if(mVerboseMode || (tr.result != tut::test_result::ok)) { @@ -127,8 +140,8 @@ public: std::cout << out.str() << std::endl; } } - - void run_completed() + + virtual void run_completed() { if (mStream) { @@ -136,11 +149,11 @@ public: } run_completed_(std::cout); } - - int getFailedTests() const { return mFailedTests; } -private: - void run_completed_(std::ostream &stream) + virtual int getFailedTests() const { return mFailedTests; } + + //private: + virtual void run_completed_(std::ostream &stream) { stream << "\tTotal Tests:\t" << mTotalTests << std::endl; stream << "\tPassed Tests:\t" << mPassedTests; @@ -149,13 +162,13 @@ private: stream << "\tYAY!! \\o/"; } stream << std::endl; - + if (mSkippedTests > 0) { stream << "\tSkipped known failures:\t" << mSkippedTests - << std::endl; + << std::endl; } - + if(mFailedTests > 0) { stream << "*********************************" << std::endl; @@ -164,8 +177,161 @@ private: stream << "*********************************" << std::endl; } } + +protected: + std::string suite_name; + bool mVerboseMode; + int mTotalTests; + int mPassedTests; + int mFailedTests; + int mSkippedTests; + std::ostream *mStream; +}; + +// copy of LLTestCallback which should become a subclass (commented out below). Delete this LLTCTestCallback one fixed. +// TeamCity specific class which emits service messages +// http://confluence.jetbrains.net/display/TCD3/Build+Script+Interaction+with+TeamCity;#BuildScriptInteractionwithTeamCity-testReporting + +class LLTCTestCallback : public tut::callback +{ +public: + LLTCTestCallback(bool verbose_mode, std::ostream *stream, std::string suitename) : + mVerboseMode(verbose_mode), + mTotalTests(0), + mPassedTests(0), + mFailedTests(0), + mSkippedTests(0), + mStream(stream), + suite_name(suitename) + { + } + + LLTCTestCallback() + { + } + + virtual void run_started() + { + //std::cout << "unit test run_started" << std::flush; + } + + virtual void group_started(const std::string& name) { + std::cout << "group_started name=" << name << std::endl; + std::cout << "##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; + } + + virtual void group_completed(const std::string& name) { + std::cout << "group_completed name=" << name << std::endl; + std::cout << "##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; + } + + virtual void test_completed(const tut::test_result& tr) + { + ++mTotalTests; + std::ostringstream out; + out << "[" << tr.group << ", " << tr.test << "] \n"; + switch(tr.result) + { + case tut::test_result::ok: + ++mPassedTests; + out << "ok"; + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::fail: + ++mFailedTests; + out << "fail"; + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::ex: + ++mFailedTests; + out << "exception"; + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::warn: + ++mFailedTests; + out << "test destructor throw"; + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::term: + ++mFailedTests; + out << "abnormal termination"; + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::skip: + ++mSkippedTests; + out << "skipped known failure"; + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + default: + ++mFailedTests; + out << "unknown"; + } + if(mVerboseMode || (tr.result != tut::test_result::ok)) + { + if(!tr.message.empty()) + { + out << ": '" << tr.message << "'"; + } + if (mStream) + { + *mStream << out.str() << std::endl; + } + + std::cout << out.str() << std::endl; + } + } + + virtual void run_completed() + { + if (mStream) + { + run_completed_(*mStream); + } + run_completed_(std::cout); + } + + virtual int getFailedTests() const { return mFailedTests; } + + //private: + virtual void run_completed_(std::ostream &stream) + { + stream << "\tTotal Tests:\t" << mTotalTests << std::endl; + stream << "\tPassed Tests:\t" << mPassedTests; + if (mPassedTests == mTotalTests) + { + stream << "\tYAY!! \\o/"; + } + stream << std::endl; + + if (mSkippedTests > 0) + { + stream << "\tSkipped known failures:\t" << mSkippedTests + << std::endl; + } + + if(mFailedTests > 0) + { + stream << "*********************************" << std::endl; + stream << "Failed Tests:\t" << mFailedTests << std::endl; + stream << "Please report or fix the problem." << std::endl; + stream << "*********************************" << std::endl; + } + } + protected: + std::string suite_name; bool mVerboseMode; int mTotalTests; int mPassedTests; @@ -174,6 +340,107 @@ protected: std::ostream *mStream; }; + +/* + // commented out subclass which should be fixed to eliminate the duplicated LLTestCallback and LLTCTestCallaback classes + // when this is fixed, the duplicated code in the if(getenv("TEAMCITY_PROJECT_NAME") statements below + // + // currectly producing errors like thr following: + // {path}viewer-tut-teamcity2/indra/build-darwin-i386/sharedlibs/RelWithDebInfo/RelWithDebInfo/PROJECT_llmessage_TEST_llmime + // --touch={path}viewer-tut-teamcity2/indra/build-darwin-i386/llmessage/PROJECT_llmessage_TEST_llmime_ok.txt + // --{path}viewer-tut-teamcity2/indra/llmessage + // + // run_started + // group_started name=mime_index + // ##teamcity[testSuiteStarted name='mime_index'] + // Segmentation fault + + + // TeamCity specific class which emits service messages + // http://confluence.jetbrains.net/display/TCD3/Build+Script+Interaction+with+TeamCity;#BuildScriptInteractionwithTeamCity-testReporting + + class LLTCTestCallback : public LLTestCallback + { + public: + LLTCTestCallback(bool verbose_mode, std::ostream *stream, std::string suitename) : + mVerboseMode(verbose_mode), + mTotalTests(0), + mPassedTests(0), + mFailedTests(0), + mSkippedTests(0), + mStream(stream), + suite_name(suitename) + { + } + + LLTCTestCallback() + { + } + + virtual void group_started(const std::string& name) { + LLTestCallback::group_started(name); + std::cout << "##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; + } + + virtual void group_completed(const std::string& name) { + LLTestCallback::group_completed(name); + std::cout << "##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; + } + + virtual void test_completed(const tut::test_result& tr) + { + LLTestCallback::test_completed(tr); + + switch(tr.result) + { + case tut::test_result::ok: + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::fail: + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::ex: + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::warn: + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::term: + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + case tut::test_result::skip: + std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + break; + default: + break; + } + + } + + protected: + std::string suite_name; + bool mVerboseMode; + int mTotalTests; + int mPassedTests; + int mFailedTests; + int mSkippedTests; + std::ostream *mStream; + }; + + } + */ + static const apr_getopt_option_t TEST_CL_OPTIONS[] = { {"help", 'h', 0, "Print the help message."}, @@ -185,27 +452,28 @@ static const apr_getopt_option_t TEST_CL_OPTIONS[] = {"touch", 't', 1, "Touch the given file if all tests succeed"}, {"wait", 'w', 0, "Wait for input before exit."}, {"debug", 'd', 0, "Emit full debug logs."}, + {"suitename", 'x', 1, "Run tests using this suitename"}, {0, 0, 0, 0} }; void stream_usage(std::ostream& s, const char* app) { s << "Usage: " << app << " [OPTIONS]" << std::endl - << std::endl; - + << std::endl; + s << "This application runs the unit tests." << std::endl << std::endl; - + s << "Options: " << std::endl; const apr_getopt_option_t* option = &TEST_CL_OPTIONS[0]; while(option->name) { s << " "; s << " -" << (char)option->optch << ", --" << option->name - << std::endl; + << std::endl; s << "\t" << option->description << std::endl << std::endl; ++option; } - + s << "Examples:" << std::endl; s << " " << app << " --verbose" << std::endl; s << "\tRun all the tests and report all results." << std::endl; @@ -242,13 +510,13 @@ int main(int argc, char **argv) LLError::initForApplication("."); LLError::setFatalFunction(wouldHaveCrashed); LLError::setDefaultLevel(LLError::LEVEL_ERROR); - //< *TODO: should come from error config file. Note that we - // have a command line option that sets this to debug. + //< *TODO: should come from error config file. Note that we + // have a command line option that sets this to debug. #ifdef CTYPE_WORKAROUND ctype_workaround(); #endif - + apr_initialize(); apr_pool_t* pool = NULL; if(APR_SUCCESS != apr_pool_create(&pool, NULL)) @@ -262,12 +530,13 @@ int main(int argc, char **argv) std::cerr << "Unable to pool" << std::endl; return 1; } - + // values used for controlling application bool verbose_mode = false; bool wait_at_exit = false; std::string test_group; - + std::string suite_name; + // values use for options parsing apr_status_t apr_err; const char* opt_arg = NULL; @@ -283,88 +552,199 @@ int main(int argc, char **argv) { char buf[255]; /* Flawfinder: ignore */ std::cerr << "Error parsing options: " - << apr_strerror(apr_err, buf, 255) << std::endl; + << apr_strerror(apr_err, buf, 255) << std::endl; return 1; } switch (opt_id) { - case 'g': - test_group.assign(opt_arg); - break; - case 'h': - stream_usage(std::cout, argv[0]); - return 0; - break; - case 'l': - stream_groups(std::cout, argv[0]); - return 0; - case 'v': - verbose_mode = true; - break; - case 'o': - output = new std::ofstream; - output->open(opt_arg); - break; - case 's': // --sourcedir - tut::sSourceDir = opt_arg; - // For convenience, so you can use tut::sSourceDir + "myfile" - tut::sSourceDir += '/'; - break; - case 't': - touch = opt_arg; - break; - case 'w': - wait_at_exit = true; - break; - case 'd': - // *TODO: should come from error config file. We set it to - // ERROR by default, so this allows full debug levels. - LLError::setDefaultLevel(LLError::LEVEL_DEBUG); - break; - default: - stream_usage(std::cerr, argv[0]); - return 1; - break; + case 'g': + test_group.assign(opt_arg); + break; + case 'h': + stream_usage(std::cout, argv[0]); + return 0; + break; + case 'l': + stream_groups(std::cout, argv[0]); + return 0; + case 'v': + verbose_mode = true; + break; + case 'o': + output = new std::ofstream; + output->open(opt_arg); + break; + case 's': // --sourcedir + tut::sSourceDir = opt_arg; + // For convenience, so you can use tut::sSourceDir + "myfile" + tut::sSourceDir += '/'; + break; + case 't': + touch = opt_arg; + break; + case 'w': + wait_at_exit = true; + break; + case 'd': + // *TODO: should come from error config file. We set it to + // ERROR by default, so this allows full debug levels. + LLError::setDefaultLevel(LLError::LEVEL_DEBUG); + break; + case 'x': + suite_name.assign(opt_arg); + break; + default: + stream_usage(std::cerr, argv[0]); + return 1; + break; } } - + + /* + // commented out test tunner logic which should be fixed when eliminate the duplicated LLTestCallback and LLTCTestCallaback classes + // become proper class:subclass + // if the Segmentation fault issue is resolved, all code in the block comments can be uncommented, and all code below can be removed. + + LLTestCallback* mycallback; + if (getenv("TEAMCITY_PROJECT_NAME")) + { + mycallback = new LLTCTestCallback(verbose_mode, output, suite_name); + + } + else + { + mycallback = new LLTestCallback(verbose_mode, output, suite_name); + } + + tut::runner.get().set_callback(mycallback); + + if(test_group.empty()) + { + tut::runner.get().run_tests(); + } + else + { + tut::runner.get().run_tests(test_group); + } + + bool success = (mycallback->getFailedTests() == 0); + + if (wait_at_exit) + { + std::cerr << "Press return to exit..." << std::endl; + std::cin.get(); + } + + if (output) + { + output->close(); + delete output; + } + + if (touch && success) + { + std::ofstream s; + s.open(touch); + s << "ok" << std::endl; + s.close(); + } + + apr_terminate(); + + int retval = (success ? 0 : 1); + return retval; + */ + // run the tests - LLTestCallback callback(verbose_mode, output); - tut::runner.get().set_callback(&callback); - if(test_group.empty()) + if (getenv("TEAMCITY_PROJECT_NAME")) { - tut::runner.get().run_tests(); + LLTCTestCallback* mycallback; + mycallback = new LLTCTestCallback(verbose_mode, output, suite_name); + + tut::runner.get().set_callback(mycallback); + + if(test_group.empty()) + { + tut::runner.get().run_tests(); + } + else + { + tut::runner.get().run_tests(test_group); + } + + bool success = (mycallback->getFailedTests() == 0); + + if (wait_at_exit) + { + std::cerr << "Press return to exit..." << std::endl; + std::cin.get(); + } + + if (output) + { + output->close(); + delete output; + } + + if (touch && success) + { + std::ofstream s; + s.open(touch); + s << "ok" << std::endl; + s.close(); + } + + apr_terminate(); + + int retval = (success ? 0 : 1); + return retval; + + } + // NOT if (getenv("TEAMCITY_PROJECT_NAME")) else { - tut::runner.get().run_tests(test_group); - } - - bool success = (callback.getFailedTests() == 0); - - if (wait_at_exit) - { - std::cerr << "Press return to exit..." << std::endl; - std::cin.get(); - } - - if (output) - { - output->close(); - delete output; - } - - if (touch && success) - { - std::ofstream s; - s.open(touch); - s << "ok" << std::endl; - s.close(); + LLTestCallback* mycallback; + mycallback = new LLTestCallback(verbose_mode, output, suite_name); + + tut::runner.get().set_callback(mycallback); + + if(test_group.empty()) + { + tut::runner.get().run_tests(); + } + else + { + tut::runner.get().run_tests(test_group); + } + + bool success = (mycallback->getFailedTests() == 0); + + if (wait_at_exit) + { + std::cerr << "Press return to exit..." << std::endl; + std::cin.get(); + } + + if (output) + { + output->close(); + delete output; + } + + if (touch && success) + { + std::ofstream s; + s.open(touch); + s << "ok" << std::endl; + s.close(); + } + + apr_terminate(); + + int retval = (success ? 0 : 1); + return retval; + } - - apr_terminate(); - - int retval = (success ? 0 : 1); - return retval; } -- cgit v1.2.3 From 9c24f2197403dd3c7f6ca6631ef446e4fb426511 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 16:15:57 -0700 Subject: subclassing is working, thanks to changes to the subclass constructor and ridding it of member variables --- indra/test/test.cpp | 447 ++++++++++------------------------------------------ 1 file changed, 82 insertions(+), 365 deletions(-) diff --git a/indra/test/test.cpp b/indra/test/test.cpp index d6959a2662..2cc1b075ca 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -63,34 +63,33 @@ namespace tut class LLTestCallback : public tut::callback { public: - LLTestCallback(bool verbose_mode, std::ostream *stream, std::string suitename) : + LLTestCallback(bool verbose_mode, std::ostream *stream) : mVerboseMode(verbose_mode), mTotalTests(0), mPassedTests(0), mFailedTests(0), mSkippedTests(0), - mStream(stream), - suite_name(suitename) + mStream(stream) { } - - LLTestCallback() + + ~LLTestCallback() { } - + virtual void run_started() { //std::cout << "run_started" << std::endl; } - + virtual void group_started(const std::string& name) { std::cout << "group_started name=" << name << std::endl; } - + virtual void group_completed(const std::string& name) { std::cout << "group_completed name=" << name << std::endl; } - + virtual void test_completed(const tut::test_result& tr) { ++mTotalTests; @@ -140,7 +139,7 @@ public: std::cout << out.str() << std::endl; } } - + virtual void run_completed() { if (mStream) @@ -149,10 +148,9 @@ public: } run_completed_(std::cout); } - + virtual int getFailedTests() const { return mFailedTests; } - - //private: + virtual void run_completed_(std::ostream &stream) { stream << "\tTotal Tests:\t" << mTotalTests << std::endl; @@ -162,13 +160,13 @@ public: stream << "\tYAY!! \\o/"; } stream << std::endl; - + if (mSkippedTests > 0) { stream << "\tSkipped known failures:\t" << mSkippedTests << std::endl; } - + if(mFailedTests > 0) { stream << "*********************************" << std::endl; @@ -177,9 +175,8 @@ public: stream << "*********************************" << std::endl; } } - + protected: - std::string suite_name; bool mVerboseMode; int mTotalTests; int mPassedTests; @@ -188,258 +185,74 @@ protected: std::ostream *mStream; }; -// copy of LLTestCallback which should become a subclass (commented out below). Delete this LLTCTestCallback one fixed. - // TeamCity specific class which emits service messages // http://confluence.jetbrains.net/display/TCD3/Build+Script+Interaction+with+TeamCity;#BuildScriptInteractionwithTeamCity-testReporting -class LLTCTestCallback : public tut::callback +class LLTCTestCallback : public LLTestCallback { public: - LLTCTestCallback(bool verbose_mode, std::ostream *stream, std::string suitename) : - mVerboseMode(verbose_mode), - mTotalTests(0), - mPassedTests(0), - mFailedTests(0), - mSkippedTests(0), - mStream(stream), - suite_name(suitename) + LLTCTestCallback(bool verbose_mode, std::ostream *stream) : + LLTestCallback(verbose_mode, stream) { } - - LLTCTestCallback() + + ~LLTCTestCallback() { } - - virtual void run_started() - { - //std::cout << "unit test run_started" << std::flush; - } - + virtual void group_started(const std::string& name) { - std::cout << "group_started name=" << name << std::endl; + LLTestCallback::group_started(name); std::cout << "##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; } - + virtual void group_completed(const std::string& name) { - std::cout << "group_completed name=" << name << std::endl; + LLTestCallback::group_completed(name); std::cout << "##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; } - + virtual void test_completed(const tut::test_result& tr) { - ++mTotalTests; - std::ostringstream out; - out << "[" << tr.group << ", " << tr.test << "] \n"; + LLTestCallback::test_completed(tr); + switch(tr.result) { case tut::test_result::ok: - ++mPassedTests; - out << "ok"; std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::fail: - ++mFailedTests; - out << "fail"; std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::ex: - ++mFailedTests; - out << "exception"; std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::warn: - ++mFailedTests; - out << "test destructor throw"; std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::term: - ++mFailedTests; - out << "abnormal termination"; std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::skip: - ++mSkippedTests; - out << "skipped known failure"; std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; default: - ++mFailedTests; - out << "unknown"; - } - if(mVerboseMode || (tr.result != tut::test_result::ok)) - { - if(!tr.message.empty()) - { - out << ": '" << tr.message << "'"; - } - if (mStream) - { - *mStream << out.str() << std::endl; - } - - std::cout << out.str() << std::endl; - } - } - - virtual void run_completed() - { - if (mStream) - { - run_completed_(*mStream); - } - run_completed_(std::cout); - } - - virtual int getFailedTests() const { return mFailedTests; } - - //private: - virtual void run_completed_(std::ostream &stream) - { - stream << "\tTotal Tests:\t" << mTotalTests << std::endl; - stream << "\tPassed Tests:\t" << mPassedTests; - if (mPassedTests == mTotalTests) - { - stream << "\tYAY!! \\o/"; - } - stream << std::endl; - - if (mSkippedTests > 0) - { - stream << "\tSkipped known failures:\t" << mSkippedTests - << std::endl; - } - - if(mFailedTests > 0) - { - stream << "*********************************" << std::endl; - stream << "Failed Tests:\t" << mFailedTests << std::endl; - stream << "Please report or fix the problem." << std::endl; - stream << "*********************************" << std::endl; + break; } + } - -protected: - std::string suite_name; - bool mVerboseMode; - int mTotalTests; - int mPassedTests; - int mFailedTests; - int mSkippedTests; - std::ostream *mStream; -}; +}; -/* - // commented out subclass which should be fixed to eliminate the duplicated LLTestCallback and LLTCTestCallaback classes - // when this is fixed, the duplicated code in the if(getenv("TEAMCITY_PROJECT_NAME") statements below - // - // currectly producing errors like thr following: - // {path}viewer-tut-teamcity2/indra/build-darwin-i386/sharedlibs/RelWithDebInfo/RelWithDebInfo/PROJECT_llmessage_TEST_llmime - // --touch={path}viewer-tut-teamcity2/indra/build-darwin-i386/llmessage/PROJECT_llmessage_TEST_llmime_ok.txt - // --{path}viewer-tut-teamcity2/indra/llmessage - // - // run_started - // group_started name=mime_index - // ##teamcity[testSuiteStarted name='mime_index'] - // Segmentation fault - - - // TeamCity specific class which emits service messages - // http://confluence.jetbrains.net/display/TCD3/Build+Script+Interaction+with+TeamCity;#BuildScriptInteractionwithTeamCity-testReporting - - class LLTCTestCallback : public LLTestCallback - { - public: - LLTCTestCallback(bool verbose_mode, std::ostream *stream, std::string suitename) : - mVerboseMode(verbose_mode), - mTotalTests(0), - mPassedTests(0), - mFailedTests(0), - mSkippedTests(0), - mStream(stream), - suite_name(suitename) - { - } - - LLTCTestCallback() - { - } - - virtual void group_started(const std::string& name) { - LLTestCallback::group_started(name); - std::cout << "##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; - } - - virtual void group_completed(const std::string& name) { - LLTestCallback::group_completed(name); - std::cout << "##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; - } - - virtual void test_completed(const tut::test_result& tr) - { - LLTestCallback::test_completed(tr); - - switch(tr.result) - { - case tut::test_result::ok: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; - break; - case tut::test_result::fail: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; - break; - case tut::test_result::ex: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; - break; - case tut::test_result::warn: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; - break; - case tut::test_result::term: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; - break; - case tut::test_result::skip: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; - break; - default: - break; - } - - } - - protected: - std::string suite_name; - bool mVerboseMode; - int mTotalTests; - int mPassedTests; - int mFailedTests; - int mSkippedTests; - std::ostream *mStream; - }; - - } - */ static const apr_getopt_option_t TEST_CL_OPTIONS[] = { @@ -460,9 +273,9 @@ void stream_usage(std::ostream& s, const char* app) { s << "Usage: " << app << " [OPTIONS]" << std::endl << std::endl; - + s << "This application runs the unit tests." << std::endl << std::endl; - + s << "Options: " << std::endl; const apr_getopt_option_t* option = &TEST_CL_OPTIONS[0]; while(option->name) @@ -473,7 +286,7 @@ void stream_usage(std::ostream& s, const char* app) s << "\t" << option->description << std::endl << std::endl; ++option; } - + s << "Examples:" << std::endl; s << " " << app << " --verbose" << std::endl; s << "\tRun all the tests and report all results." << std::endl; @@ -512,11 +325,11 @@ int main(int argc, char **argv) LLError::setDefaultLevel(LLError::LEVEL_ERROR); //< *TODO: should come from error config file. Note that we // have a command line option that sets this to debug. - + #ifdef CTYPE_WORKAROUND ctype_workaround(); #endif - + apr_initialize(); apr_pool_t* pool = NULL; if(APR_SUCCESS != apr_pool_create(&pool, NULL)) @@ -530,20 +343,20 @@ int main(int argc, char **argv) std::cerr << "Unable to pool" << std::endl; return 1; } - + // values used for controlling application bool verbose_mode = false; bool wait_at_exit = false; std::string test_group; std::string suite_name; - + // values use for options parsing apr_status_t apr_err; const char* opt_arg = NULL; int opt_id = 0; std::ofstream *output = NULL; const char *touch = NULL; - + while(true) { apr_err = apr_getopt_long(os, TEST_CL_OPTIONS, &opt_id, &opt_arg); @@ -599,152 +412,56 @@ int main(int argc, char **argv) break; } } - - /* - // commented out test tunner logic which should be fixed when eliminate the duplicated LLTestCallback and LLTCTestCallaback classes - // become proper class:subclass - // if the Segmentation fault issue is resolved, all code in the block comments can be uncommented, and all code below can be removed. - - LLTestCallback* mycallback; - if (getenv("TEAMCITY_PROJECT_NAME")) - { - mycallback = new LLTCTestCallback(verbose_mode, output, suite_name); - - } - else - { - mycallback = new LLTestCallback(verbose_mode, output, suite_name); - } - - tut::runner.get().set_callback(mycallback); - - if(test_group.empty()) - { - tut::runner.get().run_tests(); - } - else - { - tut::runner.get().run_tests(test_group); - } - - bool success = (mycallback->getFailedTests() == 0); - - if (wait_at_exit) - { - std::cerr << "Press return to exit..." << std::endl; - std::cin.get(); - } - - if (output) - { - output->close(); - delete output; - } - - if (touch && success) - { - std::ofstream s; - s.open(touch); - s << "ok" << std::endl; - s.close(); - } - - apr_terminate(); - - int retval = (success ? 0 : 1); - return retval; - */ - + // run the tests - + + LLTestCallback* mycallback; if (getenv("TEAMCITY_PROJECT_NAME")) { - LLTCTestCallback* mycallback; - mycallback = new LLTCTestCallback(verbose_mode, output, suite_name); - - tut::runner.get().set_callback(mycallback); - - if(test_group.empty()) - { - tut::runner.get().run_tests(); - } - else - { - tut::runner.get().run_tests(test_group); - } - - bool success = (mycallback->getFailedTests() == 0); - - if (wait_at_exit) - { - std::cerr << "Press return to exit..." << std::endl; - std::cin.get(); - } - - if (output) - { - output->close(); - delete output; - } - - if (touch && success) - { - std::ofstream s; - s.open(touch); - s << "ok" << std::endl; - s.close(); - } - - apr_terminate(); - - int retval = (success ? 0 : 1); - return retval; - - + mycallback = new LLTCTestCallback(verbose_mode, output); } - // NOT if (getenv("TEAMCITY_PROJECT_NAME")) else { - LLTestCallback* mycallback; - mycallback = new LLTestCallback(verbose_mode, output, suite_name); - - tut::runner.get().set_callback(mycallback); - - if(test_group.empty()) - { - tut::runner.get().run_tests(); - } - else - { - tut::runner.get().run_tests(test_group); - } - - bool success = (mycallback->getFailedTests() == 0); - - if (wait_at_exit) - { - std::cerr << "Press return to exit..." << std::endl; - std::cin.get(); - } - - if (output) - { - output->close(); - delete output; - } - - if (touch && success) - { - std::ofstream s; - s.open(touch); - s << "ok" << std::endl; - s.close(); - } - - apr_terminate(); - - int retval = (success ? 0 : 1); - return retval; - + mycallback = new LLTCTestCallback(verbose_mode, output); + } + + tut::runner.get().set_callback(mycallback); + + if(test_group.empty()) + { + tut::runner.get().run_tests(); + } + else + { + tut::runner.get().run_tests(test_group); + } + + bool success = (mycallback->getFailedTests() == 0); + + if (wait_at_exit) + { + std::cerr << "Press return to exit..." << std::endl; + std::cin.get(); + } + + if (output) + { + output->close(); + delete output; } + + if (touch && success) + { + std::ofstream s; + s.open(touch); + s << "ok" << std::endl; + s.close(); + } + + apr_terminate(); + + int retval = (success ? 0 : 1); + return retval; + + delete mycallback; } -- cgit v1.2.3 From 559ded407de578ae7c8167650fc728e2f3755ffa Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 19:52:45 -0700 Subject: commenting out object delete as windows builds are complaining: '[LogScan] e:\w-enus_viewer-tut-teamcity\latest\indra\test\test.cpp(466) : error C2220: warning treated as error - no 'object' file generated [LogScan] e:\w-enus_viewer-tut-teamcity\latest\indra\test\test.cpp(466) : warning C4702: unreachable code' --- indra/test/test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 2cc1b075ca..972c399994 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -463,5 +463,5 @@ int main(int argc, char **argv) int retval = (success ? 0 : 1); return retval; - delete mycallback; + //delete mycallback; } -- cgit v1.2.3 From 27e74d25a1827ea875f18f057a13e8c3c086c944 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 22:26:07 -0700 Subject: fixing test names for reporting purposes - removing ' test'. also, updated docs to remove that naming schema --- indra/llmessage/tests/llregionpresenceverifier_test.cpp | 2 +- indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp | 2 +- indra/llmessage/tests/lltrustedmessageservice_test.cpp | 2 +- indra/llplugin/tests/llplugincookiestore_test.cpp | 2 +- indra/llprimitive/tests/llmediaentry_test.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/llmessage/tests/llregionpresenceverifier_test.cpp b/indra/llmessage/tests/llregionpresenceverifier_test.cpp index 06152b4c6d..5b89f2a8c6 100644 --- a/indra/llmessage/tests/llregionpresenceverifier_test.cpp +++ b/indra/llmessage/tests/llregionpresenceverifier_test.cpp @@ -79,7 +79,7 @@ namespace tut namespace { - tut::factory tf("LLRegionPresenceVerifier test"); + tut::factory tf("LLRegionPresenceVerifier"); } namespace tut diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp index 65fd9da690..3b04530c1a 100644 --- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp +++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp @@ -98,7 +98,7 @@ namespace tut namespace { - tut::factory tf("LLTemplateMessageDispatcher test"); + tut::factory tf("LLTemplateMessageDispatcher"); } namespace tut diff --git a/indra/llmessage/tests/lltrustedmessageservice_test.cpp b/indra/llmessage/tests/lltrustedmessageservice_test.cpp index 8fc5934c61..b287a29841 100644 --- a/indra/llmessage/tests/lltrustedmessageservice_test.cpp +++ b/indra/llmessage/tests/lltrustedmessageservice_test.cpp @@ -98,7 +98,7 @@ namespace tut namespace { - tut::factory tf("LLTrustedMessageServiceData test"); + tut::factory tf("LLTrustedMessageServiceData"); } namespace tut diff --git a/indra/llplugin/tests/llplugincookiestore_test.cpp b/indra/llplugin/tests/llplugincookiestore_test.cpp index cc8663285f..aefa1ca144 100644 --- a/indra/llplugin/tests/llplugincookiestore_test.cpp +++ b/indra/llplugin/tests/llplugincookiestore_test.cpp @@ -112,7 +112,7 @@ namespace tut typedef test_group factory; typedef factory::object object; - factory tf("LLPluginCookieStore test"); + factory tf("LLPluginCookieStore"); // Tests template<> template<> diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp index 5234ea25f9..16e5f894e2 100644 --- a/indra/llprimitive/tests/llmediaentry_test.cpp +++ b/indra/llprimitive/tests/llmediaentry_test.cpp @@ -169,7 +169,7 @@ namespace tut namespace { // this is for naming our tests to make pretty output - tut::factory tf("MediaEntry Test"); + tut::factory tf("LLMediaEntry"); } namespace tut -- cgit v1.2.3 From 48743cbd41ab56b42959c47de8f5451f85741fbb Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 23:41:47 -0700 Subject: standardizing test suite names as class name under test --- indra/llcharacter/tests/lljoint_test.cpp | 2 +- indra/llcommon/tests/bitpack_test.cpp | 2 +- indra/llcommon/tests/commonmisc_test.cpp | 6 +++--- indra/llcommon/tests/llbase64_test.cpp | 2 +- indra/llcommon/tests/lldate_test.cpp | 2 +- indra/llcommon/tests/lldependencies_test.cpp | 2 +- indra/llcommon/tests/llframetimer_test.cpp | 2 +- indra/llcommon/tests/llprocessor_test.cpp | 2 +- indra/llcommon/tests/llrand_test.cpp | 2 +- indra/llcommon/tests/llsdserialize_test.cpp | 2 +- indra/llcommon/tests/llstring_test.cpp | 2 +- indra/llcommon/tests/lltreeiterators_test.cpp | 2 +- indra/llcommon/tests/stringize_test.cpp | 2 +- indra/llimage/tests/llimageworker_test.cpp | 4 ++-- indra/llinventory/tests/inventorymisc_test.cpp | 2 +- indra/llinventory/tests/llparcel_test.cpp | 2 +- indra/llmath/tests/llmodularmath_test.cpp | 2 +- indra/llmath/tests/llquaternion_test.cpp | 2 +- indra/llmath/tests/m3math_test.cpp | 2 +- indra/llmath/tests/mathmisc_test.cpp | 6 +++--- indra/llmath/tests/v2math_test.cpp | 2 +- indra/llmath/tests/v3color_test.cpp | 2 +- indra/llmath/tests/v3dmath_test.cpp | 2 +- indra/llmath/tests/v3math_test.cpp | 2 +- indra/llmath/tests/v4color_test.cpp | 2 +- indra/llmath/tests/v4coloru_test.cpp | 2 +- indra/llmath/tests/v4math_test.cpp | 2 +- indra/llmath/tests/xform_test.cpp | 2 +- indra/llmessage/tests/llhost_test.cpp | 2 +- indra/llmessage/tests/llmime_test.cpp | 4 ++-- indra/llmessage/tests/llnamevalue_test.cpp | 2 +- indra/llmessage/tests/llpartdata_test.cpp | 2 +- indra/llmessage/tests/llxfer_file_test.cpp | 2 +- indra/llprimitive/tests/llprimitive_test.cpp | 2 +- indra/newview/tests/llagentaccess_test.cpp | 2 +- indra/newview/tests/lldateutil_test.cpp | 2 +- indra/newview/tests/llmediadataclient_test.cpp | 2 +- indra/newview/tests/llsecapi_test.cpp | 2 +- indra/newview/tests/llsechandler_basic_test.cpp | 2 +- indra/newview/tests/llslurl_test.cpp | 2 +- indra/newview/tests/lltextureinfo_test.cpp | 2 +- indra/newview/tests/lltextureinfodetails_test.cpp | 2 +- indra/newview/tests/lltexturestatsuploader_test.cpp | 2 +- indra/newview/tests/llviewerhelputil_test.cpp | 2 +- indra/newview/tests/llviewernetwork_test.cpp | 2 +- indra/newview/tests/llworldmap_test.cpp | 6 +++--- indra/newview/tests/llworldmipmap_test.cpp | 2 +- 47 files changed, 55 insertions(+), 55 deletions(-) diff --git a/indra/llcharacter/tests/lljoint_test.cpp b/indra/llcharacter/tests/lljoint_test.cpp index 1c861b390a..e92aa832d6 100644 --- a/indra/llcharacter/tests/lljoint_test.cpp +++ b/indra/llcharacter/tests/lljoint_test.cpp @@ -42,7 +42,7 @@ namespace tut }; typedef test_group lljoint_test; typedef lljoint_test::object lljoint_object; - tut::lljoint_test lljoint_testcase("lljoint"); + tut::lljoint_test lljoint_testcase("LLJoint"); template<> template<> void lljoint_object::test<1>() diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp index a74b5ebc3a..05289881d0 100644 --- a/indra/llcommon/tests/bitpack_test.cpp +++ b/indra/llcommon/tests/bitpack_test.cpp @@ -40,7 +40,7 @@ namespace tut }; typedef test_group bit_pack_t; typedef bit_pack_t::object bit_pack_object_t; - tut::bit_pack_t tut_bit_pack("bitpack"); + tut::bit_pack_t tut_bit_pack("LLBitPack"); // pack -> unpack template<> template<> diff --git a/indra/llcommon/tests/commonmisc_test.cpp b/indra/llcommon/tests/commonmisc_test.cpp index 390e3719cf..b115c153c1 100644 --- a/indra/llcommon/tests/commonmisc_test.cpp +++ b/indra/llcommon/tests/commonmisc_test.cpp @@ -59,7 +59,7 @@ namespace tut }; typedef test_group sd_test; typedef sd_test::object sd_object; - tut::sd_test sd("llsd"); + tut::sd_test sd("LLSD"); template<> template<> void sd_object::test<1>() @@ -450,7 +450,7 @@ namespace tut }; typedef test_group mem_test; typedef mem_test::object mem_object; - tut::mem_test mem_stream("memory_stream"); + tut::mem_test mem_stream("LLMemoryStream"); template<> template<> void mem_object::test<1>() @@ -643,7 +643,7 @@ namespace tut }; typedef test_group hash_test; typedef hash_test::object hash_object; - tut::hash_test hash_tester("hash_test"); + tut::hash_test hash_tester("LLHash"); template<> template<> void hash_object::test<1>() diff --git a/indra/llcommon/tests/llbase64_test.cpp b/indra/llcommon/tests/llbase64_test.cpp index 70036dc186..d0394150fa 100644 --- a/indra/llcommon/tests/llbase64_test.cpp +++ b/indra/llcommon/tests/llbase64_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group base64_test; typedef base64_test::object base64_object; - tut::base64_test base64("base64"); + tut::base64_test base64("LLBase64"); template<> template<> void base64_object::test<1>() diff --git a/indra/llcommon/tests/lldate_test.cpp b/indra/llcommon/tests/lldate_test.cpp index a8bfda5424..7c95ccb91f 100644 --- a/indra/llcommon/tests/lldate_test.cpp +++ b/indra/llcommon/tests/lldate_test.cpp @@ -71,7 +71,7 @@ namespace tut }; typedef test_group date_test_t; typedef date_test_t::object date_test_object_t; - tut::date_test_t tut_date_test("date_test"); + tut::date_test_t tut_date_test("LLDate"); /* format validation */ template<> template<> diff --git a/indra/llcommon/tests/lldependencies_test.cpp b/indra/llcommon/tests/lldependencies_test.cpp index e4e30a33ec..e40743ccf7 100644 --- a/indra/llcommon/tests/lldependencies_test.cpp +++ b/indra/llcommon/tests/lldependencies_test.cpp @@ -145,7 +145,7 @@ namespace tut }; typedef test_group deps_group; typedef deps_group::object deps_object; - tut::deps_group depsgr("lldependencies"); + tut::deps_group depsgr("LLDependencies"); template<> template<> void deps_object::test<1>() diff --git a/indra/llcommon/tests/llframetimer_test.cpp b/indra/llcommon/tests/llframetimer_test.cpp index 215dde7e70..8ac1c91a3a 100644 --- a/indra/llcommon/tests/llframetimer_test.cpp +++ b/indra/llcommon/tests/llframetimer_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group frametimer_group_t; typedef frametimer_group_t::object frametimer_object_t; - tut::frametimer_group_t frametimer_instance("frametimer"); + tut::frametimer_group_t frametimer_instance("LLFrameTimer"); template<> template<> void frametimer_object_t::test<1>() diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp index 14adcc7303..884e1b5e5b 100644 --- a/indra/llcommon/tests/llprocessor_test.cpp +++ b/indra/llcommon/tests/llprocessor_test.cpp @@ -38,7 +38,7 @@ namespace tut typedef test_group processor_t; typedef processor_t::object processor_object_t; - tut::processor_t tut_processor("processor"); + tut::processor_t tut_processor("LLProcessor"); template<> template<> void processor_object_t::test<1>() diff --git a/indra/llcommon/tests/llrand_test.cpp b/indra/llcommon/tests/llrand_test.cpp index a21159d47e..383e6f9e0a 100644 --- a/indra/llcommon/tests/llrand_test.cpp +++ b/indra/llcommon/tests/llrand_test.cpp @@ -39,7 +39,7 @@ namespace tut typedef test_group random_t; typedef random_t::object random_object_t; - tut::random_t tut_random("random"); + tut::random_t tut_random("LLSeedRand"); template<> template<> void random_object_t::test<1>() diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index 9eaa307141..770443da1d 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -74,7 +74,7 @@ namespace tut typedef test_group sd_xml_test; typedef sd_xml_test::object sd_xml_object; - tut::sd_xml_test sd_xml_stream("sd_xml_serialization"); + tut::sd_xml_test sd_xml_stream("LLSDXMLFormatter"); template<> template<> void sd_xml_object::test<1>() diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp index aa36aab0dc..304e91ed92 100644 --- a/indra/llcommon/tests/llstring_test.cpp +++ b/indra/llcommon/tests/llstring_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group string_index_t; typedef string_index_t::object string_index_object_t; - tut::string_index_t tut_string_index("string_test"); + tut::string_index_t tut_string_index("LLString"); template<> template<> void string_index_object_t::test<1>() diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp index b0b4c7e0ad..1d619867d4 100644 --- a/indra/llcommon/tests/lltreeiterators_test.cpp +++ b/indra/llcommon/tests/lltreeiterators_test.cpp @@ -56,7 +56,7 @@ namespace tut }; typedef test_group iter_group; typedef iter_group::object iter_object; - tut::iter_group ig("lltreeiterators"); + tut::iter_group ig("LLTreeIterators"); } // namespace tut /***************************************************************************** diff --git a/indra/llcommon/tests/stringize_test.cpp b/indra/llcommon/tests/stringize_test.cpp index 757aa85ed7..3d34f23998 100644 --- a/indra/llcommon/tests/stringize_test.cpp +++ b/indra/llcommon/tests/stringize_test.cpp @@ -80,7 +80,7 @@ namespace tut }; typedef test_group stringize_group; typedef stringize_group::object stringize_object; - tut::stringize_group strzgrp("stringize"); + tut::stringize_group strzgrp("stringize_h"); template<> template<> void stringize_object::test<1>() diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 98694aa7ee..a109276709 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -144,11 +144,11 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group imagedecodethread_t; typedef imagedecodethread_t::object imagedecodethread_object_t; - tut::imagedecodethread_t tut_imagedecodethread("imagedecodethread"); + tut::imagedecodethread_t tut_imagedecodethread("LLImageDecodeThread"); typedef test_group imagerequest_t; typedef imagerequest_t::object imagerequest_object_t; - tut::imagerequest_t tut_imagerequest("imagerequest"); + tut::imagerequest_t tut_imagerequest("LLImageRequest"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp index 9773a3fed4..c9af7c4eac 100644 --- a/indra/llinventory/tests/inventorymisc_test.cpp +++ b/indra/llinventory/tests/inventorymisc_test.cpp @@ -100,7 +100,7 @@ namespace tut }; typedef test_group inventory_test; typedef inventory_test::object inventory_object; - tut::inventory_test inv("llinventory"); + tut::inventory_test inv("LLInventory"); //***class LLInventoryType***// diff --git a/indra/llinventory/tests/llparcel_test.cpp b/indra/llinventory/tests/llparcel_test.cpp index 80d0bdae5a..f2e4b03ff7 100644 --- a/indra/llinventory/tests/llparcel_test.cpp +++ b/indra/llinventory/tests/llparcel_test.cpp @@ -40,7 +40,7 @@ namespace tut }; typedef test_group llinventoryparcel_test; typedef llinventoryparcel_test::object llinventoryparcel_object; - tut::llinventoryparcel_test llinventoryparcel("llinventoryparcel"); + tut::llinventoryparcel_test llinventoryparcel("LLInventoryParcel"); template<> template<> void llinventoryparcel_object::test<1>() diff --git a/indra/llmath/tests/llmodularmath_test.cpp b/indra/llmath/tests/llmodularmath_test.cpp index e6525542f1..063d3ef79f 100644 --- a/indra/llmath/tests/llmodularmath_test.cpp +++ b/indra/llmath/tests/llmodularmath_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group modularmath_test; typedef modularmath_test::object modularmath_object; - tut::modularmath_test modularmath_testcase("modularmath"); + tut::modularmath_test modularmath_testcase("LLModularMath"); template<> template<> void modularmath_object::test<1>() diff --git a/indra/llmath/tests/llquaternion_test.cpp b/indra/llmath/tests/llquaternion_test.cpp index 29e7793d49..9e79b299ff 100644 --- a/indra/llmath/tests/llquaternion_test.cpp +++ b/indra/llmath/tests/llquaternion_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group llquat_test_t; typedef llquat_test_t::object llquat_test_object_t; - tut::llquat_test_t tut_llquat_test("llquat"); + tut::llquat_test_t tut_llquat_test("LLQuaternion"); //test case for LLQuaternion::LLQuaternion(void) fn. template<> template<> diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp index 3b424f79c6..8abf61b740 100644 --- a/indra/llmath/tests/m3math_test.cpp +++ b/indra/llmath/tests/m3math_test.cpp @@ -44,7 +44,7 @@ namespace tut }; typedef test_group m3math_test_t; typedef m3math_test_t::object m3math_test_object_t; - tut::m3math_test_t tut_m3math_test("m3math_test"); + tut::m3math_test_t tut_m3math_test("m3math_h"); //test case for setIdentity() fn. template<> template<> diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp index 58b78cd491..91a2e6c009 100644 --- a/indra/llmath/tests/mathmisc_test.cpp +++ b/indra/llmath/tests/mathmisc_test.cpp @@ -45,7 +45,7 @@ namespace tut }; typedef test_group math_test; typedef math_test::object math_object; - tut::math_test tm("basic_linden_math"); + tut::math_test tm("BasicLindenMath"); template<> template<> void math_object::test<1>() @@ -178,7 +178,7 @@ namespace tut }; typedef test_group uuid_test; typedef uuid_test::object uuid_object; - tut::uuid_test tu("uuid"); + tut::uuid_test tu("LLUUID"); template<> template<> void uuid_object::test<1>() @@ -233,7 +233,7 @@ namespace tut }; typedef test_group crc_test; typedef crc_test::object crc_object; - tut::crc_test tc("crc"); + tut::crc_test tc("LLCrc"); template<> template<> void crc_object::test<1>() diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp index e112892c49..9747996b25 100644 --- a/indra/llmath/tests/v2math_test.cpp +++ b/indra/llmath/tests/v2math_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group v2math_test; typedef v2math_test::object v2math_object; - tut::v2math_test v2math_testcase("v2math"); + tut::v2math_test v2math_testcase("v2math_h"); template<> template<> void v2math_object::test<1>() diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp index 4a05a84123..2c00f00ab3 100644 --- a/indra/llmath/tests/v3color_test.cpp +++ b/indra/llmath/tests/v3color_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group v3color_test; typedef v3color_test::object v3color_object; - tut::v3color_test v3color_testcase("v3color"); + tut::v3color_test v3color_testcase("v3color_h"); template<> template<> void v3color_object::test<1>() diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp index 68bcbd124f..b67346f4e5 100644 --- a/indra/llmath/tests/v3dmath_test.cpp +++ b/indra/llmath/tests/v3dmath_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group v3dmath_test; typedef v3dmath_test::object v3dmath_object; - tut::v3dmath_test v3dmath_testcase("v3dmath"); + tut::v3dmath_test v3dmath_testcase("v3dmath_h"); template<> template<> void v3dmath_object::test<1>() diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp index e6ef5d5012..e4732bf861 100644 --- a/indra/llmath/tests/v3math_test.cpp +++ b/indra/llmath/tests/v3math_test.cpp @@ -45,7 +45,7 @@ namespace tut }; typedef test_group v3math_test; typedef v3math_test::object v3math_object; - tut::v3math_test v3math_testcase("v3math"); + tut::v3math_test v3math_testcase("v3math_h"); template<> template<> void v3math_object::test<1>() diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp index dde5f9069b..fbd43625d1 100644 --- a/indra/llmath/tests/v4color_test.cpp +++ b/indra/llmath/tests/v4color_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group v4color_test; typedef v4color_test::object v4color_object; - tut::v4color_test v4color_testcase("v4color"); + tut::v4color_test v4color_testcase("v4color_h"); template<> template<> void v4color_object::test<1>() diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp index 1408d05b81..6d84ba41ef 100644 --- a/indra/llmath/tests/v4coloru_test.cpp +++ b/indra/llmath/tests/v4coloru_test.cpp @@ -42,7 +42,7 @@ namespace tut }; typedef test_group v4coloru_test; typedef v4coloru_test::object v4coloru_object; - tut::v4coloru_test v4coloru_testcase("v4coloru"); + tut::v4coloru_test v4coloru_testcase("v4coloru_h"); template<> template<> void v4coloru_object::test<1>() diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp index 24c1af5e61..b1f934e555 100644 --- a/indra/llmath/tests/v4math_test.cpp +++ b/indra/llmath/tests/v4math_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group v4math_test; typedef v4math_test::object v4math_object; - tut::v4math_test v4math_testcase("v4math"); + tut::v4math_test v4math_testcase("v4math_h"); template<> template<> void v4math_object::test<1>() diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp index 1337daa50a..49870eef3c 100644 --- a/indra/llmath/tests/xform_test.cpp +++ b/indra/llmath/tests/xform_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group xform_test_t; typedef xform_test_t::object xform_test_object_t; - tut::xform_test_t tut_xform_test("xform_test"); + tut::xform_test_t tut_xform_test("LLXForm"); //test case for init(), getParent(), getRotation(), getPositionW(), getWorldRotation() fns. template<> template<> diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index 36f819ad33..b20bceae1d 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group host_test; typedef host_test::object host_object; - tut::host_test host_testcase("llhost"); + tut::host_test host_testcase("LLHost"); template<> template<> diff --git a/indra/llmessage/tests/llmime_test.cpp b/indra/llmessage/tests/llmime_test.cpp index 0616c070c4..aed5c4589c 100644 --- a/indra/llmessage/tests/llmime_test.cpp +++ b/indra/llmessage/tests/llmime_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group mime_index_t; typedef mime_index_t::object mime_index_object_t; - tut::mime_index_t tut_mime_index("mime_index"); + tut::mime_index_t tut_mime_index("LLMime"); template<> template<> void mime_index_object_t::test<1>() @@ -228,7 +228,7 @@ namespace tut }; typedef test_group mime_parse_t; typedef mime_parse_t::object mime_parse_object_t; - tut::mime_parse_t tut_mime_parse("mime_parse"); + tut::mime_parse_t tut_mime_parse("LLMimeParse"); template<> template<> void mime_parse_object_t::test<1>() diff --git a/indra/llmessage/tests/llnamevalue_test.cpp b/indra/llmessage/tests/llnamevalue_test.cpp index da22ec80ef..8902fdd2e8 100644 --- a/indra/llmessage/tests/llnamevalue_test.cpp +++ b/indra/llmessage/tests/llnamevalue_test.cpp @@ -49,7 +49,7 @@ namespace tut }; typedef test_group namevalue_t; typedef namevalue_t::object namevalue_object_t; - tut::namevalue_t tut_namevalue("namevalue_test"); + tut::namevalue_t tut_namevalue("LLNameValue"); template<> template<> diff --git a/indra/llmessage/tests/llpartdata_test.cpp b/indra/llmessage/tests/llpartdata_test.cpp index b26e7a5849..9123bd06c7 100644 --- a/indra/llmessage/tests/llpartdata_test.cpp +++ b/indra/llmessage/tests/llpartdata_test.cpp @@ -44,7 +44,7 @@ namespace tut }; typedef test_group partdata_test_t; typedef partdata_test_t::object partdata_test_object_t; - tut::partdata_test_t tut_partdata_test("partdata_test"); + tut::partdata_test_t tut_partdata_test("LLPartData"); template<> template<> void partdata_test_object_t::test<1>() diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp index 081f898417..a8c1adf9b4 100644 --- a/indra/llmessage/tests/llxfer_file_test.cpp +++ b/indra/llmessage/tests/llxfer_file_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group llxfer_test; typedef llxfer_test::object llxfer_object; - tut::llxfer_test llxfer("llxfer"); + tut::llxfer_test llxfer("LLXferFile"); template<> template<> void llxfer_object::test<1>() diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp index e181a59dd6..0d60c7cd15 100644 --- a/indra/llprimitive/tests/llprimitive_test.cpp +++ b/indra/llprimitive/tests/llprimitive_test.cpp @@ -96,7 +96,7 @@ namespace tut typedef test_group llprimitive_t; typedef llprimitive_t::object llprimitive_object_t; - tut::llprimitive_t tut_llprimitive("llprimitive"); + tut::llprimitive_t tut_llprimitive("LLPrimitive"); template<> template<> void llprimitive_object_t::test<1>() diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp index a0a9659475..c970d79975 100644 --- a/indra/newview/tests/llagentaccess_test.cpp +++ b/indra/newview/tests/llagentaccess_test.cpp @@ -74,7 +74,7 @@ namespace tut typedef test_group agentaccess_t; typedef agentaccess_t::object agentaccess_object_t; - tut::agentaccess_t tut_agentaccess("agentaccess"); + tut::agentaccess_t tut_agentaccess("LLAgentAccess"); template<> template<> void agentaccess_object_t::test<1>() diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp index 530171b87e..99b346cff8 100644 --- a/indra/newview/tests/lldateutil_test.cpp +++ b/indra/newview/tests/lldateutil_test.cpp @@ -103,7 +103,7 @@ namespace tut typedef test_group dateutil_t; typedef dateutil_t::object dateutil_object_t; - tut::dateutil_t tut_dateutil("dateutil"); + tut::dateutil_t tut_dateutil("LLDateUtil"); template<> template<> void dateutil_object_t::test<1>() diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp index 495073cf67..92e77a7b10 100644 --- a/indra/newview/tests/llmediadataclient_test.cpp +++ b/indra/newview/tests/llmediadataclient_test.cpp @@ -234,7 +234,7 @@ namespace tut typedef test_group mediadataclient_t; typedef mediadataclient_t::object mediadataclient_object_t; - tut::mediadataclient_t tut_mediadataclient("mediadataclient"); + tut::mediadataclient_t tut_mediadataclient("LLMediaDataClient"); void ensure(const std::string &msg, int value, int expected) { diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp index d5b6555b6e..c319a47915 100644 --- a/indra/newview/tests/llsecapi_test.cpp +++ b/indra/newview/tests/llsecapi_test.cpp @@ -147,7 +147,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group secapiTestFactory; typedef secapiTestFactory::object secapiTestObject; - tut::secapiTestFactory tut_test("llsecapi"); + tut::secapiTestFactory tut_test("LLSecAPI"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index c48498ebcd..daa10819fc 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -311,7 +311,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group sechandler_basic_test_factory; typedef sechandler_basic_test_factory::object sechandler_basic_test_object; - tut::sechandler_basic_test_factory tut_test("llsechandler_basic"); + tut::sechandler_basic_test_factory tut_test("LLSecHandler"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 753151bdd8..8a293d1625 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -96,7 +96,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group slurlTestFactory; typedef slurlTestFactory::object slurlTestObject; - tut::slurlTestFactory tut_test("llslurl"); + tut::slurlTestFactory tut_test("LLSlurl"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/lltextureinfo_test.cpp b/indra/newview/tests/lltextureinfo_test.cpp index 7fa8602adc..73ace1de37 100644 --- a/indra/newview/tests/lltextureinfo_test.cpp +++ b/indra/newview/tests/lltextureinfo_test.cpp @@ -68,7 +68,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group textureinfo_t; typedef textureinfo_t::object textureinfo_object_t; - tut::textureinfo_t tut_textureinfo("textureinfo"); + tut::textureinfo_t tut_textureinfo("LLTectureInfo"); // --------------------------------------------------------------------------------------- diff --git a/indra/newview/tests/lltextureinfodetails_test.cpp b/indra/newview/tests/lltextureinfodetails_test.cpp index 3cd4c10da2..31ec5f9d4e 100644 --- a/indra/newview/tests/lltextureinfodetails_test.cpp +++ b/indra/newview/tests/lltextureinfodetails_test.cpp @@ -67,7 +67,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group textureinfodetails_t; typedef textureinfodetails_t::object textureinfodetails_object_t; - tut::textureinfodetails_t tut_textureinfodetails("textureinfodetails"); + tut::textureinfodetails_t tut_textureinfodetails("LLTextureInfoDetails"); // --------------------------------------------------------------------------------------- diff --git a/indra/newview/tests/lltexturestatsuploader_test.cpp b/indra/newview/tests/lltexturestatsuploader_test.cpp index caeabd08b3..cfb2c267cc 100644 --- a/indra/newview/tests/lltexturestatsuploader_test.cpp +++ b/indra/newview/tests/lltexturestatsuploader_test.cpp @@ -90,7 +90,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group texturestatsuploader_t; typedef texturestatsuploader_t::object texturestatsuploader_object_t; - tut::texturestatsuploader_t tut_texturestatsuploader("texturestatsuploader"); + tut::texturestatsuploader_t tut_texturestatsuploader("LLTextureStatsUploader"); // --------------------------------------------------------------------------------------- diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 4c71f15db1..a0f1d1c3c3 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -109,7 +109,7 @@ namespace tut typedef test_group viewerhelputil_t; typedef viewerhelputil_t::object viewerhelputil_object_t; - tut::viewerhelputil_t tut_viewerhelputil("viewerhelputil"); + tut::viewerhelputil_t tut_viewerhelputil("LLViewerHelpUtil"); template<> template<> void viewerhelputil_object_t::test<1>() diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index 2320201ee8..6cd2db487b 100644 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -122,7 +122,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group viewerNetworkTestFactory; typedef viewerNetworkTestFactory::object viewerNetworkTestObject; - tut::viewerNetworkTestFactory tut_test("llviewernetwork"); + tut::viewerNetworkTestFactory tut_test("LLViewerNetwork"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp index 443279c062..b976ac5ea9 100644 --- a/indra/newview/tests/llworldmap_test.cpp +++ b/indra/newview/tests/llworldmap_test.cpp @@ -144,15 +144,15 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group iteminfo_t; typedef iteminfo_t::object iteminfo_object_t; - tut::iteminfo_t tut_iteminfo("iteminfo"); + tut::iteminfo_t tut_iteminfo("LLItemInfo"); typedef test_group siminfo_t; typedef siminfo_t::object siminfo_object_t; - tut::siminfo_t tut_siminfo("siminfo"); + tut::siminfo_t tut_siminfo("LLSimInfo"); typedef test_group worldmap_t; typedef worldmap_t::object worldmap_object_t; - tut::worldmap_t tut_worldmap("worldmap"); + tut::worldmap_t tut_worldmap("LLWorldMap"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp index 272e59061d..54887ae219 100644 --- a/indra/newview/tests/llworldmipmap_test.cpp +++ b/indra/newview/tests/llworldmipmap_test.cpp @@ -89,7 +89,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group worldmipmap_t; typedef worldmipmap_t::object worldmipmap_object_t; - tut::worldmipmap_t tut_worldmipmap("worldmipmap"); + tut::worldmipmap_t tut_worldmipmap("LLWorldMipmap"); // --------------------------------------------------------------------------------------- // Test functions -- cgit v1.2.3 From 6bf5da6657d503827874db91b3c77453291619b0 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 23:57:25 -0700 Subject: seems that build out put sometimes concatenates and we miss a line in our reporting parse, adding newlines at the beginning of each case out --- indra/test/test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 972c399994..8916bc9dea 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -202,12 +202,12 @@ public: virtual void group_started(const std::string& name) { LLTestCallback::group_started(name); - std::cout << "##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; + std::cout << "\n##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; } virtual void group_completed(const std::string& name) { LLTestCallback::group_completed(name); - std::cout << "##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; + std::cout << "\n##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; } virtual void test_completed(const tut::test_result& tr) @@ -217,31 +217,31 @@ public: switch(tr.result) { case tut::test_result::ok: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::fail: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::ex: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::warn: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::term: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; case tut::test_result::skip: - std::cout << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; + std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']\n" << std::flush; std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; break; -- cgit v1.2.3 From 334c04ce1a9c6dbbc7ee35fcbacc7b14f65f75b1 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Wed, 25 Aug 2010 00:52:59 -0700 Subject: standardizing a couple of stragler test 'suite' names as class name --- indra/newview/tests/lllogininstance_test.cpp | 2 +- indra/viewer_components/login/tests/lllogin_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index a0697af6c3..55823fc386 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -314,7 +314,7 @@ namespace tut typedef test_group lllogininstance_group; typedef lllogininstance_group::object lllogininstance_object; - lllogininstance_group llsdmgr("lllogininstance"); + lllogininstance_group llsdmgr("LLLoginInstance"); template<> template<> void lllogininstance_object::test<1>() diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 577f5dac89..95d0421273 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -226,7 +226,7 @@ namespace tut typedef test_group llviewerlogin_group; typedef llviewerlogin_group::object llviewerlogin_object; - llviewerlogin_group llviewerlogingrp("llviewerlogin"); + llviewerlogin_group llviewerlogingrp("LLViewerLogin"); template<> template<> void llviewerlogin_object::test<1>() -- cgit v1.2.3 From 3172b4db1ee4d2059d2605ce616bdb10c840fc03 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Wed, 25 Aug 2010 11:48:20 -0700 Subject: forcing all the teamcity service messages to be spat out at once per suite to avoid incorrect TC reporting --- indra/test/test.cpp | 65 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 8916bc9dea..ffdb0cb976 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -83,11 +83,11 @@ public: } virtual void group_started(const std::string& name) { - std::cout << "group_started name=" << name << std::endl; + std::cout << "Unit test group_started name=" << name << std::endl; } virtual void group_completed(const std::string& name) { - std::cout << "group_completed name=" << name << std::endl; + std::cout << "Unit test group_completed name=" << name << std::endl; } virtual void test_completed(const tut::test_result& tr) @@ -192,7 +192,8 @@ class LLTCTestCallback : public LLTestCallback { public: LLTCTestCallback(bool verbose_mode, std::ostream *stream) : - LLTestCallback(verbose_mode, stream) + LLTestCallback(verbose_mode, stream), + mTCStream() { } @@ -202,12 +203,12 @@ public: virtual void group_started(const std::string& name) { LLTestCallback::group_started(name); - std::cout << "\n##teamcity[testSuiteStarted name='" << name << "']\n" << std::flush; + mTCStream << "\n##teamcity[testSuiteStarted name='" << name << "']" << std::endl; } virtual void group_completed(const std::string& name) { LLTestCallback::group_completed(name); - std::cout << "\n##teamcity[testSuiteFinished name='" << name << "']\n" << std::flush; + mTCStream << "##teamcity[testSuiteFinished name='" << name << "']" << std::endl; } virtual void test_completed(const tut::test_result& tr) @@ -217,33 +218,33 @@ public: switch(tr.result) { case tut::test_result::ok: - std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl; break; case tut::test_result::fail: - std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl; + mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl; break; case tut::test_result::ex: - std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl; + mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl; break; case tut::test_result::warn: - std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl; + mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl; break; case tut::test_result::term: - std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl; + mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl; break; case tut::test_result::skip: - std::cout << "\n##teamcity[testStarted name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']\n" << std::flush; - std::cout << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']\n" << std::flush; + mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']" << std::endl; + mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl; break; default: break; @@ -251,6 +252,24 @@ public: } + virtual void run_completed() + { + LLTestCallback::run_completed(); + + // dump the TC reporting results to cout + tc_run_completed_(std::cout); + } + + virtual void tc_run_completed_(std::ostream &stream) + { + + // dump the TC reporting results to cout + stream << mTCStream.str() << std::endl; + } + +protected: + std::ostringstream mTCStream; + }; @@ -422,7 +441,7 @@ int main(int argc, char **argv) } else { - mycallback = new LLTCTestCallback(verbose_mode, output); + mycallback = new LLTestCallback(verbose_mode, output); } tut::runner.get().set_callback(mycallback); -- cgit v1.2.3