Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Unified Diff: base/test/run_all_unittests.cc

Issue 23132002: GTTF: Add a basic new unit test launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed gyp cycle Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/gtest_xml_util.cc ('k') | base/test/test_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « base/test/gtest_xml_util.cc ('k') | base/test/test_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698