diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-09-30 21:42:04 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-09-30 21:42:04 -0400 |
commit | eca30a22626b9a3e68e0e55f8da75614cd60d713 (patch) | |
tree | d27f30f138553c1f0fbc0e61ef0d2ae036d54662 /indra/test/test.cpp | |
parent | bc4444cd78067cbf11d3ffb210375a31a33f96bd (diff) | |
parent | 3f05d552fec9d4d9a17c9131f445a7db0eef561f (diff) |
QAR-1619: merge up to 2009-09-26 viewer/viewer-20
Diffstat (limited to 'indra/test/test.cpp')
-rw-r--r-- | indra/test/test.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/test/test.cpp b/indra/test/test.cpp index e7ba8e33b8..07e187ce45 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -69,13 +69,14 @@ namespace tut class LLTestCallback : public tut::callback { public: - LLTestCallback(bool verbose_mode, std::ostream *stream) : + LLTestCallback(bool verbose_mode, std::ostream *stream, bool wait) : mVerboseMode(verbose_mode), mTotalTests(0), mPassedTests(0), mFailedTests(0), mSkippedTests(0), - mStream(stream) + mStream(stream), + mWaitAtExit(wait) { } @@ -142,6 +143,11 @@ public: } run_completed_(std::cout); + if(mWaitAtExit) { + std::cerr << "Waiting for input before exiting..." << std::endl; + std::cin.get(); + } + if (mFailedTests > 0) { exit(1); @@ -181,6 +187,7 @@ protected: int mFailedTests; int mSkippedTests; std::ostream *mStream; + bool mWaitAtExit; }; static const apr_getopt_option_t TEST_CL_OPTIONS[] = @@ -338,7 +345,7 @@ int main(int argc, char **argv) } // run the tests - LLTestCallback callback(verbose_mode, output); + LLTestCallback callback(verbose_mode, output, wait_at_exit); tut::runner.get().set_callback(&callback); if(test_group.empty()) @@ -349,12 +356,6 @@ int main(int argc, char **argv) { tut::runner.get().run_tests(test_group); } - - if (wait_at_exit) - { - std::cerr << "Waiting for input before exiting..." << std::endl; - std::cin.get(); - } if (output) { |