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.cpp19
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)
{