diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-10-05 15:50:24 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-10-05 15:50:24 -0700 |
commit | 39ee2367a7e771890017fc3d663780437ea69bb2 (patch) | |
tree | b84c3ade59dba5ae032a3123afb9c3c5f78c9b68 /indra/test | |
parent | 374deb8da13c63f80dc1b245488eb254eb86f5d2 (diff) | |
parent | 6ef3f20933c5df684298bc1b8f338ce9dfd49070 (diff) |
Merging due to changes since my last pull.
Diffstat (limited to 'indra/test')
-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; } |