diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 13:42:15 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 13:42:15 +0000 |
commit | 9f3324505ea9aa0bf52ecb953c187e7faffa5c89 (patch) | |
tree | 38a3fe83a0318d341d6530901f0c357da6ed386c /mojo/system | |
parent | 7c38c83a3b878b4c78088147117e91e9581a93b8 (diff) | |
download | chromium_src-9f3324505ea9aa0bf52ecb953c187e7faffa5c89.zip chromium_src-9f3324505ea9aa0bf52ecb953c187e7faffa5c89.tar.gz chromium_src-9f3324505ea9aa0bf52ecb953c187e7faffa5c89.tar.bz2 |
Mojo: Switch mojo_system_unittests to its own run_all_unittests.cc.
* It'll allow me to write death tests and silence warnings on Linux.
* It'll allow me (hopefully) to fiddle with other things as well, like
parallelism/retries/time-outs.
Note that this is different from mojo/common/test/run_all_unittests.cc,
which initializes the system layer, etc. (and thus is meant to run tests
for stuff at a higher layer).
R=darin@chromium.org
Review URL: https://codereview.chromium.org/417923002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/system')
-rw-r--r-- | mojo/system/run_all_unittests.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mojo/system/run_all_unittests.cc b/mojo/system/run_all_unittests.cc new file mode 100644 index 0000000..7e9c8c5 --- /dev/null +++ b/mojo/system/run_all_unittests.cc @@ -0,0 +1,20 @@ +// Copyright 2014 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/bind.h" +#include "base/test/launcher/unit_test_launcher.h" +#include "base/test/test_suite.h" +#include "testing/gtest/include/gtest/gtest.h" + +int main(int argc, char** argv) { + // Silence death test thread warnings on Linux. We can afford to run our death + // tests a little more slowly (< 10 ms per death test on a Z620). + testing::GTEST_FLAG(death_test_style) = "threadsafe"; + + base::TestSuite test_suite(argc, argv); + + return base::LaunchUnitTests( + argc, argv, base::Bind(&base::TestSuite::Run, + base::Unretained(&test_suite))); +} |