diff options
-rw-r--r-- | base/base.gyp | 16 | ||||
-rw-r--r-- | build/temp_gyp/googleurl.gyp | 7 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 6 | ||||
-rw-r--r-- | cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp | 6 | ||||
-rw-r--r-- | dbus/dbus.gyp | 2 | ||||
-rw-r--r-- | sync/sync.gyp | 8 | ||||
-rw-r--r-- | third_party/cacheinvalidation/cacheinvalidation.gyp | 4 | ||||
-rw-r--r-- | third_party/libphonenumber/libphonenumber.gyp | 5 |
8 files changed, 25 insertions, 29 deletions
diff --git a/base/base.gyp b/base/base.gyp index e7d8624..08461d7 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -139,13 +139,22 @@ } ], }, + # Include this target for a main() function that simply instantiates + # and runs a base::TestSuite. + { + 'target_name': 'run_all_unittests', + 'type': 'static_library', + 'dependencies': [ + 'test_support_base', + ], + 'sources': [ + 'test/run_all_unittests.cc', + ], + }, { 'target_name': 'base_unittests', 'type': 'executable', 'sources': [ - # Infrastructure files. - 'test/run_all_unittests.cc', - # Tests. 'android/jni_android_unittest.cc', 'android/scoped_java_ref_unittest.cc', @@ -295,6 +304,7 @@ 'base', 'base_i18n', 'base_static', + 'run_all_unittests', 'test_support_base', 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../testing/gmock.gyp:gmock', diff --git a/build/temp_gyp/googleurl.gyp b/build/temp_gyp/googleurl.gyp index 8d61551..3115ce6 100644 --- a/build/temp_gyp/googleurl.gyp +++ b/build/temp_gyp/googleurl.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 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. @@ -71,7 +71,7 @@ 'dependencies': [ 'googleurl', '../../base/base.gyp:base_i18n', - '../../base/base.gyp:test_support_base', + '../../base/base.gyp:run_all_unittests', '../../testing/gtest.gyp:gtest', '../../third_party/icu/icu.gyp:icuuc', ], @@ -81,9 +81,6 @@ '../../googleurl/src/url_parse_unittest.cc', '../../googleurl/src/url_test_utils.h', '../../googleurl/src/url_util_unittest.cc', - # Make sure base and ICU are started up the 'Chromium way' since the - # build is using the Chromium base & ICU. - '../../base/test/run_all_unittests.cc', ], 'conditions': [ ['os_posix==1 and OS!="mac"', { diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 34ab8ee..204021c 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1135,6 +1135,7 @@ 'type': 'executable', 'dependencies': [ 'chromedriver_lib', + '../base/base.gyp:run_all_unittests', '../base/base.gyp:test_support_base', '../testing/gtest.gyp:gtest', '../skia/skia.gyp:skia', @@ -1143,7 +1144,6 @@ '..', ], 'sources': [ - '../base/test/run_all_unittests.cc', 'test/webdriver/commands/set_timeout_commands_unittest.cc', 'test/webdriver/frame_path_unittest.cc', 'test/webdriver/http_response_unittest.cc', @@ -3631,7 +3631,6 @@ 'target_name': 'sync_unit_tests', 'type': 'executable', 'sources': [ - '../base/test/run_all_unittests.cc', 'browser/sync/api/sync_change_unittest.cc', 'browser/sync/api/sync_error_unittest.cc', 'browser/sync/internal_api/change_record_unittest.cc', @@ -3653,11 +3652,12 @@ '..', ], 'dependencies': [ - '../sync/sync.gyp:sync_tests', + '../base/base.gyp:run_all_unittests', '../base/base.gyp:test_support_base', '../jingle/jingle.gyp:notifier_test_util', '../net/net.gyp:net', '../net/net.gyp:net_test_support', + '../sync/sync.gyp:sync_tests', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', 'syncapi_core', diff --git a/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp b/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp index f909dcf..9186e9b 100644 --- a/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp +++ b/cloud_print/virtual_driver/win/port_monitor/virtual_driver_port_monitor.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 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. @@ -57,13 +57,11 @@ 'type': 'executable', 'dependencies': [ '../../../../base/base.gyp:base', - '../../../../base/base.gyp:test_support_base', + '../../../../base/base.gyp:run_all_unittests', '../../../../testing/gmock.gyp:gmock', '../../../../testing/gtest.gyp:gtest', ], 'sources': [ - # Infrastructure files. - '../../../../base/test/run_all_unittests.cc', 'port_monitor_unittest.cc', ], }, diff --git a/dbus/dbus.gyp b/dbus/dbus.gyp index 0e30503..bbb5e30 100644 --- a/dbus/dbus.gyp +++ b/dbus/dbus.gyp @@ -72,6 +72,7 @@ 'target_name': 'dbus_unittests', 'type': 'executable', 'dependencies': [ + '../base/base.gyp:run_all_unittests', '../base/base.gyp:test_support_base', '../build/linux/system.gyp:dbus', '../testing/gmock.gyp:gmock', @@ -81,7 +82,6 @@ 'dbus_test_support', ], 'sources': [ - '../base/test/run_all_unittests.cc', 'bus_unittest.cc', 'end_to_end_async_unittest.cc', 'end_to_end_sync_unittest.cc', diff --git a/sync/sync.gyp b/sync/sync.gyp index f355761..a596965 100644 --- a/sync/sync.gyp +++ b/sync/sync.gyp @@ -324,17 +324,11 @@ # # TODO(akalin): Rename this to sync_unit_tests once we've moved # everything from chrome.gyp. - # - # TODO(akalin): Make base.gyp have a test_main target that - # includes run_all_unittests.cc and the possible tcmalloc - # dependency and use that everywhere. { 'target_name': 'sync_unit_tests_canary', 'type': 'executable', - 'sources': [ - '../base/test/run_all_unittests.cc', - ], 'dependencies': [ + '../base/base.gyp:run_all_unittests', 'sync_tests', ], diff --git a/third_party/cacheinvalidation/cacheinvalidation.gyp b/third_party/cacheinvalidation/cacheinvalidation.gyp index 8e47824..95c9b09 100644 --- a/third_party/cacheinvalidation/cacheinvalidation.gyp +++ b/third_party/cacheinvalidation/cacheinvalidation.gyp @@ -190,7 +190,6 @@ 'target_name': 'cacheinvalidation_unittests', 'type': 'executable', 'sources': [ - '../../base/test/run_all_unittests.cc', 'files/src/google/cacheinvalidation/test/deterministic-scheduler.cc', 'files/src/google/cacheinvalidation/test/deterministic-scheduler.h', 'files/src/google/cacheinvalidation/test/test-logger.cc', @@ -204,8 +203,7 @@ ], 'dependencies': [ '../../base/base.gyp:base', - # Needed by run_all_unittests.cc. - '../../base/base.gyp:test_support_base', + '../../base/base.gyp:run_all_unittests', '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest', 'cacheinvalidation', diff --git a/third_party/libphonenumber/libphonenumber.gyp b/third_party/libphonenumber/libphonenumber.gyp index 159dd22..16f21dc 100644 --- a/third_party/libphonenumber/libphonenumber.gyp +++ b/third_party/libphonenumber/libphonenumber.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 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. @@ -77,7 +77,6 @@ 'target_name': 'libphonenumber_unittests', 'type': 'executable', 'sources': [ - '../../base/test/run_all_unittests.cc', 'src/phonenumbers/test_metadata.cc', 'src/test/phonenumbers/asyoutypeformatter_test.cc', 'src/test/phonenumbers/phonenumbermatch_test.cc', @@ -92,7 +91,7 @@ '../icu/icu.gyp:icui18n', '../icu/icu.gyp:icuuc', '../../base/base.gyp:base', - '../../base/base.gyp:test_support_base', + '../../base/base.gyp:run_all_unittests', '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest', |