# 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. # Nothing outside //chrome/chrome_cleaner can depend on these targets. visibility = [ "//chrome/chrome_cleaner/*" ] # 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", ] } 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", "//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", "//chrome/chrome_cleaner/os:common_os", ] } source_set("test_pup_data") { testonly = true sources = [ "test_pup_data.cc", "test_pup_data.h", ] deps = [ "//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 = [ "child_process_logger.cc", "child_process_logger.h", "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/test:test_support", "//chrome/chrome_cleaner/constants:common_strings", "//chrome/chrome_cleaner/os:cleaner_os", "//chrome/chrome_cleaner/os:common_os", "//chrome/chrome_cleaner/os:file_remover_api", "//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", "//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. # These tests run the executables and test their behaviour. They're run as part # of chrome_cleaner_unittests so that we don't need a separate test binary for # the integration tests. source_set("integration_test_sources") { testonly = true sources = [ "cleaner_test.cc", "secure_dll_loading_test.cc", ] deps = [ ":test_util", "//base", "//base/test:test_support", "//chrome/chrome_cleaner:buildflags", "//chrome/chrome_cleaner/constants:common_strings", "//chrome/chrome_cleaner/logging/proto:chrome_cleaner_report_proto", "//chrome/chrome_cleaner/logging/proto:reporter_logs_proto", "//chrome/chrome_cleaner/logging/proto:shared_data_proto", "//chrome/chrome_cleaner/os:common_os", "//chrome/chrome_cleaner/pup_data:pup_data_base", "//chrome/chrome_cleaner/pup_data:test_uws", "//chrome/chrome_cleaner/test:test_util", "//chrome/chrome_cleaner/zip_archiver:common", "//components/chrome_cleaner/public/constants", "//components/chrome_cleaner/test:test_name_helper", "//testing/gtest", ] data_deps = [ # Binaries that will be loaded by the tests. ":empty_dll", "//chrome/chrome_cleaner/executables:chrome_cleanup_tool", "//chrome/chrome_cleaner/executables:software_reporter_tool", ] } 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/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/test:test_support", "//build/win:default_exe_manifest", ] }