diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-05 13:39:53 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-05 13:39:53 -0700 |
commit | 81a63ac0886a31a566535a3483e5013f5bc0b424 (patch) | |
tree | 1bb0319755a5e26e0bc7f9f20632ae8f31538971 /indra/test/test.cpp | |
parent | 0f5bbec3747f3ff2b1d580506d35dc080fcd1a98 (diff) | |
parent | 9818f158366a0df980a2e4b9251177d9a9209cfb (diff) |
merge with latest from lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/test/test.cpp')
-rw-r--r-- | indra/test/test.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/test/test.cpp b/indra/test/test.cpp index e7ba8e33b8..721e9da917 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -141,12 +141,9 @@ public: run_completed_(*mStream); } run_completed_(std::cout); - - if (mFailedTests > 0) - { - exit(1); - } } + + int getFailedTests() const { return mFailedTests; } private: void run_completed_(std::ostream &stream) @@ -350,9 +347,11 @@ int main(int argc, char **argv) tut::runner.get().run_tests(test_group); } + bool success = (callback.getFailedTests() == 0); + if (wait_at_exit) { - std::cerr << "Waiting for input before exiting..." << std::endl; + std::cerr << "Press return to exit..." << std::endl; std::cin.get(); } @@ -362,7 +361,7 @@ int main(int argc, char **argv) delete output; } - if (touch) + if (touch && success) { std::ofstream s; s.open(touch); @@ -371,5 +370,7 @@ int main(int argc, char **argv) } apr_terminate(); - return 0; + + int retval = (success ? 0 : 1); + return retval; } |