naiveproxy/chrome/chrome_cleaner/test/BUILD.gn
2018-08-14 22:19:20 +00:00

207 lines
4.4 KiB
Plaintext

# Copyright 2018 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.
shared_library("empty_dll") {
sources = [
"empty_dll.cc",
]
}
source_set("scoped_file") {
sources = [
"scoped_file.cc",
"scoped_file.h",
]
deps = [
"//base:base",
]
}
source_set("test_strings") {
testonly = true
sources = [
"test_strings.cc",
"test_strings.h",
]
}
source_set("test_executables") {
testonly = true
sources = [
"test_executables.cc",
"test_executables.h",
]
# Assume that every target that uses the test_executables header will run one
# of the executables, so make sure they are built.
data_deps = [
":test_process",
":test_service",
]
deps = [
":test_strings",
":test_util",
"//base:base",
"//chrome/chrome_cleaner/constants:common_strings",
"//chrome/chrome_cleaner/os:common_os",
]
}
source_set("test_util") {
testonly = true
sources = [
"reboot_deletion_helper.cc",
"reboot_deletion_helper.h",
"test_file_util.cc",
"test_file_util.h",
"test_layered_service_provider.cc",
"test_layered_service_provider.h",
"test_name_helper.h",
"test_registry_util.cc",
"test_registry_util.h",
"test_settings_util.cc",
"test_settings_util.h",
"test_task_scheduler.cc",
"test_task_scheduler.h",
"test_util.cc",
"test_util.h",
]
deps = [
":test_pup_data",
":test_strings",
"//base:base",
"//base/test:test_support",
"//chrome/chrome_cleaner/constants:common_strings",
"//chrome/chrome_cleaner/os:cleaner_os",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/settings:settings",
"//chrome/chrome_cleaner/strings",
"//components/chrome_cleaner/public/constants:constants",
"//sandbox/win:sandbox",
]
data_deps = [
":empty_dll",
"//chrome/chrome_cleaner/test/resources:signed_empty_dll",
]
public_deps = [
"//chrome/chrome_cleaner/logging/proto:shared_data_proto",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("test_scoped_service_handle") {
testonly = true
sources = [
"test_scoped_service_handle.cc",
"test_scoped_service_handle.h",
]
deps = [
":test_executables",
":test_strings",
"//base",
"//chrome/chrome_cleaner/os:cleaner_os",
"//chrome/chrome_cleaner/os:common_os",
]
}
source_set("test_branding_header") {
# This is NOT testonly because it's used by RegistryOverrideManager, which is
# shipped on official builds.
sources = [
"test_branding.h",
]
}
source_set("test_pup_data") {
testonly = true
sources = [
"test_pup_data.cc",
"test_pup_data.h",
"test_signatures.cc",
"test_uws_catalog.cc",
"test_uws_catalog.h",
]
deps = [
"//base:base",
"//chrome/chrome_cleaner/logging/proto:shared_data_proto",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:dynamic_pup",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/pup_data:test_uws",
"//testing/gtest",
]
}
source_set("unittest_sources") {
testonly = true
sources = [
"reboot_deletion_helper_unittest.cc",
"test_util_unittest.cc",
]
deps = [
":test_util",
"//base",
"//base/test:test_support",
"//chrome/chrome_cleaner/os:common_os",
"//testing/gtest",
]
}
executable("test_process") {
testonly = true
sources = [
"//chrome/chrome_cleaner/engines/dummy_engine_resources.cc",
"test_process_main.cc",
]
deps = [
":test_strings",
":test_util",
"//base:base",
"//base/test:test_support",
"//build/win:default_exe_manifest",
"//chrome/chrome_cleaner:other_executable_definitions",
"//chrome/chrome_cleaner/engines:resources",
"//chrome/chrome_cleaner/os:common_os",
]
# Default entrypoint is main, console app. Change it to wWinMain, windowed.
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
}
executable("test_service") {
testonly = true
sources = [
"test_service_main.cc",
]
deps = [
":test_strings",
"//base:base",
"//base/test:test_support",
"//build/win:default_exe_manifest",
]
}