From 98756e2372dab700cb87b1ba5973b8df0940d0ef Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Wed, 4 Jun 2014 16:57:40 +0000 Subject: [PATCH] Make GN unit tests single process. Clean up gin run all unittests file. I noticed some extra includes while searching for some code to copy. BUG= R=jochen@chromium.org Review URL: https://codereview.chromium.org/318543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274850 0039d316-1c4b-4281-b951-d872f2087c98 --- gin/test/run_all_unittests.cc | 3 --- tools/gn/BUILD.gn | 2 +- tools/gn/gn.gyp | 2 +- tools/gn/run_all_unittests.cc | 13 +++++++++++++ 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 tools/gn/run_all_unittests.cc diff --git a/gin/test/run_all_unittests.cc b/gin/test/run_all_unittests.cc index cb1c96c7bf5440..25500a6bc7d03f 100644 --- a/gin/test/run_all_unittests.cc +++ b/gin/test/run_all_unittests.cc @@ -2,10 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/basictypes.h" #include "base/bind.h" -#include "base/compiler_specific.h" -#include "base/memory/scoped_ptr.h" #include "base/test/launcher/unit_test_launcher.h" #include "base/test/test_suite.h" diff --git a/tools/gn/BUILD.gn b/tools/gn/BUILD.gn index 39dc92ba107a0b..5c0065b44f7ba1 100644 --- a/tools/gn/BUILD.gn +++ b/tools/gn/BUILD.gn @@ -200,6 +200,7 @@ test("gn_unittests") { "parser_unittest.cc", "path_output_unittest.cc", "pattern_unittest.cc", + "run_all_unittests.cc", "scope_per_file_provider_unittest.cc", "scope_unittest.cc", "source_dir_unittest.cc", @@ -215,7 +216,6 @@ test("gn_unittests") { ] deps = [ ":gn_lib", - "//base/test:run_all_unittests", "//base/test:test_support", "//testing/gtest", ] diff --git a/tools/gn/gn.gyp b/tools/gn/gn.gyp index b43e7007059614..c3ae8628c55f92 100644 --- a/tools/gn/gn.gyp +++ b/tools/gn/gn.gyp @@ -201,6 +201,7 @@ 'parser_unittest.cc', 'path_output_unittest.cc', 'pattern_unittest.cc', + 'run_all_unittests.cc', 'scope_per_file_provider_unittest.cc', 'scope_unittest.cc', 'source_dir_unittest.cc', @@ -215,7 +216,6 @@ ], 'dependencies': [ 'gn_lib', - '../../base/base.gyp:run_all_unittests', '../../base/base.gyp:test_support_base', '../../testing/gtest.gyp:gtest', ], diff --git a/tools/gn/run_all_unittests.cc b/tools/gn/run_all_unittests.cc new file mode 100644 index 00000000000000..edd80fed5d8196 --- /dev/null +++ b/tools/gn/run_all_unittests.cc @@ -0,0 +1,13 @@ +// 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/test_suite.h" + +// Don't use the multiprocess test harness. This test suite is fast enough and +// it makes the output more difficult to read. +int main(int argc, char** argv) { + base::TestSuite test_suite(argc, argv); + return test_suite.Run(); +}