blob: 8543ed37f48e73915db838d7335884c8259855e6 [file] [log] [blame]
# 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.
# Targets used by tests.
shared_library("empty_dll") {
sources = [
"empty_dll.cc",
]
configs += [
# This is required to prevent this target from having to be rebuilt every
# time, even with the source files doesn't change.
"//base:base_win_linker_flags",
]
}
source_set("scoped_file") {
sources = [
"scoped_file.cc",
"scoped_file.h",
]
deps = [
"//base:base",
]
}
source_set("test_branding_header") {
testonly = true
sources = [
"test_branding.h",
]
}
source_set("test_component") {
testonly = true
sources = [
"test_component.cc",
"test_component.h",
]
deps = [
"//chrome/chrome_cleaner/components:components",
"//chrome/chrome_cleaner/constants:uws_id",
]
}
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_extensions") {
sources = [
"test_extensions.cc",
"test_extensions.h",
]
deps = [
"//base:base",
"//chrome/chrome_cleaner/os:common_os",
]
}
source_set("test_pup_data") {
testonly = true
sources = [
"test_pup_data.cc",
"test_pup_data.h",
]
deps = [
":test_uws_catalog",
"//base:base",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
]
}
source_set("test_uws_catalog") {
# This is not testonly because it is used by the test engine, which can be
# used in the full executables to detect test UwS.
sources = [
"test_uws_catalog.cc",
"test_uws_catalog.h",
]
deps = [
"//chrome/chrome_cleaner/pup_data:dynamic_pup",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/pup_data:test_uws",
]
}
source_set("test_scoped_service_handle") {
testonly = true
sources = [
"test_scoped_service_handle.cc",
"test_scoped_service_handle.h",
]
deps = [
":test_executables",
"//base",
"//chrome/chrome_cleaner/os:cleaner_os",
"//chrome/chrome_cleaner/os:common_os",
"//testing/gtest",
]
}
source_set("test_strings") {
testonly = true
sources = [
"test_strings.cc",
"test_strings.h",
]
}
source_set("test_util") {
testonly = true
sources = [
"file_remover_test_util.cc",
"file_remover_test_util.h",
"reboot_deletion_helper.cc",
"reboot_deletion_helper.h",
"scoped_process_protector.cc",
"scoped_process_protector.h",
"test_file_util.cc",
"test_file_util.h",
"test_layered_service_provider.cc",
"test_layered_service_provider.h",
"test_native_reg_util.cc",
"test_native_reg_util.h",
"test_registry_util.cc",
"test_registry_util.h",
"test_settings_util.cc",
"test_settings_util.h",
"test_signature_matcher.h",
"test_task_scheduler.cc",
"test_task_scheduler.h",
"test_util.cc",
"test_util.h",
]
deps = [
":test_pup_data",
":test_strings",
":test_uws_catalog",
"//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/scanner:matcher_util",
"//chrome/chrome_cleaner/scanner:signature_matcher_api",
"//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",
]
}
# Targets that contain tests.
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/gmock",
"//testing/gtest",
]
}
# Executable targets.
executable("test_process") {
testonly = true
sources = [
"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/os:common_os",
"//chrome/chrome_cleaner/settings:dummy_engine_settings",
]
}
executable("test_service") {
testonly = true
sources = [
"test_service_main.cc",
]
deps = [
":test_strings",
"//base:base",
"//base/test:test_support",
"//build/win:default_exe_manifest",
]
}