diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 00:50:33 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 00:50:33 +0000 |
commit | 4cbafd3a738558dd71be58737ce3502595d43a7d (patch) | |
tree | 2c4fe0112b6e78682e7b02aa412e917d619974b9 /ipc | |
parent | 2bd2c037fc6edbf605e1924de26b15b9a21729bc (diff) | |
download | chromium_src-4cbafd3a738558dd71be58737ce3502595d43a7d.zip chromium_src-4cbafd3a738558dd71be58737ce3502595d43a7d.tar.gz chromium_src-4cbafd3a738558dd71be58737ce3502595d43a7d.tar.bz2 |
Run ipc_tests serially when using new test launcher.
On Windows they would hit resource contention issues
otherwise and run slower than serially.
Run time is in seconds anyway.
BUG=236893
R=jeremy@chromium.org
Review URL: https://codereview.chromium.org/93663002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc.gyp | 2 | ||||
-rw-r--r-- | ipc/run_all_unittests.cc | 40 |
2 files changed, 41 insertions, 1 deletions
diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp index a247651..ace836b 100644 --- a/ipc/ipc.gyp +++ b/ipc/ipc.gyp @@ -37,7 +37,6 @@ 'test_support_ipc', '../base/base.gyp:base', '../base/base.gyp:base_i18n', - '../base/base.gyp:run_all_unittests', '../base/base.gyp:test_support_base', '../testing/gtest.gyp:gtest', ], @@ -57,6 +56,7 @@ 'ipc_sync_message_unittest.h', 'ipc_test_base.cc', 'ipc_test_base.h', + 'run_all_unittests.cc', 'sync_socket_unittest.cc', 'unix_domain_socket_util_unittest.cc', ], diff --git a/ipc/run_all_unittests.cc b/ipc/run_all_unittests.cc new file mode 100644 index 0000000..d36f871 --- /dev/null +++ b/ipc/run_all_unittests.cc @@ -0,0 +1,40 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// 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/launcher/unit_test_launcher.h" +#include "base/test/test_suite.h" + +#if defined(OS_ANDROID) +#include "base/android/jni_android.h" +#include "base/test/test_file_util.h" +#endif + +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) { +#if defined(OS_ANDROID) + JNIEnv* env = base::android::AttachCurrentThread(); + file_util::RegisterContentUriTestUtils(env); +#else + base::AtExitManager at_exit; +#endif + return base::LaunchUnitTestsSerially(argc, + argv, + base::Bind(&RunTestSuite, argc, argv)); +} |