0

Mark gtest and gmock as testonly in GN.

This updates the targets that depend on these to also be test-only.

BUG=http://crbug.com/412064
R=jamesr@chromium.org, tfarina@chromium.org

Review URL: https://codereview.chromium.org/551933002

Cr-Commit-Position: refs/heads/master@{#293808}
This commit is contained in:
Brett Wilson
2014-09-08 15:59:49 -07:00
parent 647665c49d
commit 0c8745ab0e
46 changed files with 66 additions and 2 deletions
base
breakpad
build/secondary/testing
components
BUILD.gn
auto_login_parser
autofill
content
browser
core
browser
common
bookmarks
browser
test
captive_portal
cloud_devices
common
component_updater
crx_file
data_reduction_proxy
common
dom_distiller
domain_reliability
enhanced_bookmarks
gcm_driver
invalidation
omnibox
password_manager
content
renderer
core
browser
policy
sessions
signin
core
browser
sync_driver
device/bluetooth
gin
gpu
ipc
jingle
media
mojo
embedder
public
c
system
cpp
test_support
sandbox/linux
sql
sync
ui

@ -1035,6 +1035,7 @@ source_set("prefs_test_support") {
}
source_set("message_loop_tests") {
testonly = true
sources = [
"message_loop/message_loop_test.cc",
"message_loop/message_loop_test.h",

@ -9,7 +9,8 @@ if (is_android) {
}
source_set("test_support") {
testonly = true
# TODO http://crbug.com/412064 enable this flag all the time.
testonly = !is_component_build
sources = [
"expectations/expectation.cc",
"expectations/expectation.h",

@ -480,7 +480,7 @@ if (is_linux) {
]
}
executable("breakpad_unittests") {
test("breakpad_unittests") {
sources = [
"linux/breakpad_googletest_includes.h",
"src/client/linux/handler/exception_handler_unittest.cc",
@ -542,6 +542,7 @@ if (is_linux) {
}
executable("linux_dumper_unittest_helper") {
testonly = true
sources = [
"src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc",
]
@ -560,6 +561,7 @@ if (is_linux) {
executable("generate_test_dump") {
testonly = true
sources = [
"linux/generate-test-dump.cc",
]

@ -8,6 +8,8 @@ config("gmock_config") {
}
static_library("gmock") {
# TODO http://crbug.com/412064 enable this flag all the time.
testonly = !is_component_build
sources = [
# Sources based on files in r173 of gmock.
"include/gmock/gmock-actions.h",
@ -40,6 +42,8 @@ static_library("gmock") {
}
static_library("gmock_main") {
# TODO http://crbug.com/412064 enable this flag all the time.
testonly = !is_component_build
sources = [ "src/gmock_main.cc" ]
deps = [ ":gmock" ]
}

@ -59,6 +59,8 @@ config("gtest_direct_config") {
}
static_library("gtest") {
# TODO http://crbug.com/412064 enable this flag all the time.
testonly = !is_component_build
sources = [
"include/gtest/gtest-death-test.h",
"include/gtest/gtest-message.h",
@ -111,6 +113,8 @@ static_library("gtest") {
}
source_set("gtest_main") {
# TODO http://crbug.com/412064 enable this flag all the time.
testonly = !is_component_build
sources = [ "src/gtest_main.cc" ]
deps = [ ":gtest" ]
}

@ -7,6 +7,7 @@ import("//build/config/features.gni")
# Collection of all components. You wouldn't link to this, but this is rather
# to reference the files so they can be compiled by the build system.
group("all_components") {
testonly = true # You shouldn't actually link to this.
visibility = [ "//:*" ] # Only for the root targets to bring in.
deps = [

@ -15,6 +15,7 @@ source_set("auto_login_parser") {
}
source_set("unit_tests") {
testonly = true
sources = [
"auto_login_parser_unittest.cc",
]

@ -78,6 +78,7 @@ proto_library("risk_proto") {
}
static_library("test_support") {
testonly = true
sources = [
"wallet/mock_wallet_client.cc",
"wallet/mock_wallet_client.h",
@ -91,6 +92,7 @@ static_library("test_support") {
}
source_set("unit_tests") {
testonly = true
sources = [
"content_autofill_driver_unittest.cc",
"request_autocomplete_manager_unittest.cc",

@ -174,6 +174,7 @@ static_library("browser") {
}
static_library("test_support") {
testonly = true
sources = [
"autofill_test_utils.cc",
"autofill_test_utils.h",
@ -199,6 +200,7 @@ static_library("test_support") {
}
source_set("unit_tests") {
testonly = true
sources = [
"address_field_unittest.cc",
"address_unittest.cc",

@ -55,6 +55,7 @@ static_library("common") {
}
source_set("unit_tests") {
testonly = true
sources = [
"form_data_unittest.cc",
"form_field_data_unittest.cc",

@ -61,6 +61,7 @@ source_set("browser") {
}
source_set("unit_tests") {
testonly = true
sources = [
"bookmark_codec_unittest.cc",
"bookmark_expanded_state_tracker_unittest.cc",

@ -5,6 +5,7 @@
import ("//build/config/ui.gni")
source_set("test") {
testonly = true
sources = [
"bookmark_test_helpers.cc",
"bookmark_test_helpers.h",

@ -21,6 +21,7 @@ component("captive_portal") {
}
static_library("test_support") {
testonly = true
sources = [
"captive_portal_testing_utils.cc",
"captive_portal_testing_utils.h",
@ -35,6 +36,7 @@ static_library("test_support") {
}
source_set("unit_tests") {
testonly = true
sources = [
"captive_portal_detector_unittest.cc",
]

@ -25,6 +25,7 @@ static_library("common") {
}
source_set("unit_tests") {
testonly = true
sources = [
"cloud_devices_urls_unittest.cc",
"printer_description_unittest.cc",

@ -52,6 +52,7 @@ source_set("component_updater") {
}
static_library("test_support") {
testonly = true
sources = [
"test/test_configurator.cc",
"test/test_configurator.h",
@ -69,6 +70,7 @@ static_library("test_support") {
}
source_set("unit_tests") {
testonly = true
sources = [
"test/component_patcher_unittest.cc",
"test/component_updater_ping_manager_unittest.cc",

@ -17,6 +17,7 @@ source_set("crx_file") {
}
source_set("unit_tests") {
testonly = true
sources = [
"id_util_unittest.cc",
]

@ -18,6 +18,7 @@ static_library("common") {
}
source_set("unit_tests") {
testonly = true
sources = [
"data_reduction_proxy_headers_unittest.cc",
]

@ -72,6 +72,7 @@ static_library("core") {
# GYP version: components/dom_distiller.gypi:dom_distiller_test_support
static_library("test_support") {
testonly = true
sources = [
"dom_distiller_test_util.cc",
"dom_distiller_test_util.h",
@ -91,6 +92,7 @@ static_library("test_support") {
}
source_set("unit_tests") {
testonly = true
sources = [
"article_entry_unittest.cc",
"distilled_content_store_unittest.cc",

@ -62,6 +62,7 @@ component("domain_reliability") {
}
source_set("unit_tests") {
testonly = true
sources = [
"config_unittest.cc",
"context_unittest.cc",

@ -32,6 +32,7 @@ source_set("enhanced_bookmarks") {
}
source_set("test_support") {
testonly = true
sources = [
"test_image_store.cc",
"test_image_store.h",

@ -66,6 +66,7 @@ static_library("gcm_driver") {
}
static_library("test_support") {
testonly = true
sources = [
"fake_gcm_app_handler.cc",
"fake_gcm_app_handler.h",

@ -93,6 +93,7 @@ static_library("invalidation") {
}
static_library("test_support") {
testonly = true
sources = [
"fake_invalidation_handler.cc",
"fake_invalidation_handler.h",

@ -67,6 +67,7 @@ static_library("test_support") {
}
source_set("unit_tests") {
testonly = true
sources = [
"answers_cache_unittest.cc",
"autocomplete_input_unittest.cc",

@ -18,6 +18,7 @@ static_library("renderer") {
}
source_set("browser_tests") {
testonly = true
sources = [
"credential_manager_client_browsertest.cc"
]

@ -92,6 +92,7 @@ static_library("browser") {
}
static_library("test_support") {
testonly = true
sources = [
"mock_password_store.cc",
"mock_password_store.h",

@ -138,6 +138,7 @@ if (enable_configuration_policy) {
}
static_library("policy_component_test_support") {
testonly = true
sources = [
"core/browser/configuration_policy_pref_store_test.cc",
"core/browser/configuration_policy_pref_store_test.h",

@ -29,6 +29,7 @@ component("sessions") {
}
static_library("test_support") {
testonly = true
sources = [
"serialized_navigation_entry_test_helper.cc",
"serialized_navigation_entry_test_helper.h",

@ -73,6 +73,7 @@ static_library("browser") {
}
static_library("test_support") {
testonly = true
sources = [
"fake_auth_status_provider.cc",
"fake_auth_status_provider.h",

@ -61,6 +61,7 @@ static_library("sync_driver") {
}
static_library("test_support") {
testonly = true
sources = [
"change_processor_mock.cc",
"change_processor_mock.h",

@ -178,6 +178,7 @@ grit("strings") {
}
static_library("mocks") {
testonly = true
sources = [
"test/mock_bluetooth_adapter.cc",
"test/mock_bluetooth_adapter.h",

@ -81,6 +81,7 @@ executable("gin_shell") {
}
source_set("gin_test") {
testonly = true
sources = [
"test/file.cc",
"test/file.h",

@ -48,6 +48,7 @@ component("gpu") {
}
source_set("test_support") {
testonly = true
sources = [
"command_buffer/service/gles2_cmd_decoder_mock.cc",
"command_buffer/service/error_state_mock.cc",

@ -158,6 +158,7 @@ if (!is_android) {
}
static_library("test_support") {
testonly = true
sources = [
"ipc_multiprocess_test.cc",
"ipc_multiprocess_test.h",

@ -90,6 +90,7 @@ if (enable_webrtc || !is_android) {
# GYP version: jingle/jingle.gyp:notifier_test_util
static_library("notifier_test_util") {
testonly = true
sources = [
"notifier/base/fake_base_task.cc",
"notifier/base/fake_base_task.h",

@ -619,6 +619,7 @@ test("media_perftests") {
}
source_set("test_support") {
testonly = true
sources = [
"filters/clockless_video_frame_scheduler.cc",
"filters/clockless_video_frame_scheduler.h",

@ -236,6 +236,7 @@ source_set("audio") {
}
source_set("test_support") {
testonly = true
sources = [
"clockless_audio_sink.cc",
"clockless_audio_sink.h",
@ -251,6 +252,7 @@ source_set("test_support") {
}
source_set("unittests") {
testonly = true
sources = [
"audio_input_controller_unittest.cc",
"audio_input_unittest.cc",

@ -224,6 +224,7 @@ source_set("base") {
}
source_set("test_support") {
testonly = true
sources = [
"fake_audio_render_callback.cc",
"fake_audio_render_callback.h",
@ -248,6 +249,7 @@ source_set("test_support") {
}
source_set("unittests") {
testonly = true
sources = [
"audio_block_fifo_unittest.cc",
"audio_buffer_converter_unittest.cc",
@ -324,6 +326,7 @@ source_set("unittests") {
}
source_set("perftests") {
testonly = true
sources = [
"audio_bus_perftest.cc",
"audio_converter_perftest.cc",

@ -52,6 +52,7 @@ source_set("android") {
}
source_set("unittests") {
testonly = true
sources = [
"media_codec_bridge_unittest.cc",
"media_drm_bridge_unittest.cc",

@ -52,6 +52,7 @@ source_set("embedder") {
}
source_set("embedder_unittests") {
testonly = true
visibility = [ "//mojo/system:mojo_system_unittests" ]
testonly = true

@ -3,6 +3,7 @@
# found in the LICENSE file.
source_set("tests") {
testonly = true
visibility = [ "//mojo/public/cpp/system/tests:mojo_public_system_unittests" ]
deps = [

@ -4,6 +4,7 @@
# GYP version: mojo/mojo_public_tests.gypi:mojo_public_test_utils
source_set("test_utils") {
testonly = true
deps = [
"//base",
"//testing/gtest",

@ -35,6 +35,7 @@ group("sandbox") {
}
source_set("sandbox_linux_test_utils") {
testonly = true
sources = [
"tests/sandbox_test_runner.cc",
"tests/sandbox_test_runner.h",

@ -33,6 +33,7 @@ component("sql") {
}
source_set("test_support") {
testonly = true
sources = [
"test/error_callback_support.cc",
"test/error_callback_support.h",

@ -416,6 +416,7 @@ source_set("sync_core") {
# GYP version: sync/sync_tests.gypi:test_support_sync_core
static_library("test_support_sync_core") {
testonly = true
sources = [
"internal_api/public/base/model_type_test_util.cc",
"internal_api/public/base/model_type_test_util.h",
@ -491,6 +492,7 @@ static_library("test_support_sync_core") {
# GYP version: sync/sync_tests.gypi:test_support_sync_internal_api
static_library("test_support_sync_internal_api") {
testonly = true
sources = [
"internal_api/public/test/fake_sync_manager.h",
"internal_api/public/test/null_sync_context_proxy.h",
@ -527,6 +529,7 @@ static_library("test_support_sync_internal_api") {
# GYP version: sync/sync_tests.gypi:test_support_sync_api
static_library("test_support_sync_api") {
testonly = true
sources = [
"api/fake_syncable_service.cc",
"api/fake_syncable_service.h",
@ -669,6 +672,7 @@ test("sync_unit_tests") {
# GYP version: sync/sync_tests.gypi:test_support_sync_fake_server
static_library("test_support_sync_fake_server") {
testonly = true
sources = [
"test/fake_server/bookmark_entity.cc",
"test/fake_server/bookmark_entity.h",

@ -552,6 +552,7 @@ component("base") {
}
source_set("test_support") {
testonly = true
sources = [
"test/ui_controls.h",
"test/ui_controls_aura.cc",

@ -316,6 +316,7 @@ config("gl_unittest_utils_config") {
}
source_set("gl_unittest_utils") {
testonly = true
sources = [
"gl_mock.h",
"gl_mock.cc",