Index: base/test/run_all_unittests.cc |
diff --git a/base/test/run_all_unittests.cc b/base/test/run_all_unittests.cc |
index 2c8d29c6d00885e8e8c27f74a105e94cb5c96fa4..51f504dd27a8b77ce92a8001e5c3f6468a5c6f04 100644 |
--- a/base/test/run_all_unittests.cc |
+++ b/base/test/run_all_unittests.cc |
@@ -2,8 +2,31 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/at_exit.h" |
+#include "base/bind.h" |
#include "base/test/test_suite.h" |
+#include "base/test/unit_test_launcher.h" |
+ |
+namespace { |
+ |
+class NoAtExitBaseTestSuite : public base::TestSuite { |
+ public: |
+ NoAtExitBaseTestSuite(int argc, char** argv) |
+ : base::TestSuite(argc, argv, false) { |
+ } |
+}; |
+ |
+int RunTestSuite(int argc, char** argv) { |
+ return NoAtExitBaseTestSuite(argc, argv).Run(); |
+} |
+ |
+} // namespace |
int main(int argc, char** argv) { |
- return base::TestSuite(argc, argv).Run(); |
+#if !defined(OS_ANDROID) |
+ base::AtExitManager at_exit; |
+#endif |
+ return base::LaunchUnitTests(argc, |
+ argv, |
+ base::Bind(&RunTestSuite, argc, argv)); |
} |