| # 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. |
| |
| import("//chrome/chrome_cleaner/chrome_cleaner_args.gni") |
| import("//testing/test.gni") |
| |
| group("engine_definitions") { |
| if (is_official_chrome_cleaner_build) { |
| deps = [ |
| "//chrome_cleaner_internal:engine_definitions", |
| ] |
| } else { |
| deps = [ |
| "//chrome/chrome_cleaner/engines/common:dummy_engine_resources", |
| "//chrome/chrome_cleaner/settings:dummy_engine_settings", |
| ] |
| } |
| } |
| |
| group("engine_target_factory") { |
| if (is_internal_chrome_cleaner_build) { |
| deps = [ |
| "//chrome_cleaner_internal:engine_target_factory", |
| ] |
| } else { |
| deps = [ |
| "//chrome/chrome_cleaner/engines/target:dummy_engine_delegate_factory", |
| ] |
| } |
| } |
| |
| # This library should only be included in executable targets. It contains |
| # definitions used by the unit tests and misc helper binaries. The |
| # software_reporter_tool and chrome_cleanup_tool binaries will depend on |
| # specific reporter-only and cleaner-only versions of these definitions. |
| static_library("other_executable_definitions") { |
| testonly = true |
| |
| sources = [ |
| "//chrome/chrome_cleaner/logging/other_logging_definitions.cc", |
| "//chrome/chrome_cleaner/settings/other_settings_definitions.cc", |
| ] |
| |
| deps = [ |
| "//chrome/chrome_cleaner/logging:logging_definitions", |
| "//chrome/chrome_cleaner/logging:noop_logging", |
| "//chrome/chrome_cleaner/proto:shared_pup_enums_proto", |
| "//chrome/chrome_cleaner/settings:settings_definitions", |
| ] |
| } |
| |
| test("chrome_cleaner_unittests") { |
| sources = [ |
| "//chrome/chrome_cleaner/test/test_main.cc", |
| "//chrome/chrome_cleaner/test/unit_test_override_command_line.cc", |
| ] |
| |
| deps = [ |
| # Dependencies of the test harness. |
| ":engine_definitions", |
| ":engine_target_factory", |
| ":other_executable_definitions", |
| "//base", |
| "//base/test:test_support", |
| "//chrome/chrome_cleaner/crash:crashpad_lib", |
| "//chrome/chrome_cleaner/ipc:sandbox", |
| "//chrome/chrome_cleaner/logging:common", |
| "//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_types", |
| "//chrome/chrome_cleaner/test:test_pup_data", |
| "//chrome/chrome_cleaner/test:test_util", |
| "//sandbox/win:sandbox", |
| "//testing/gtest", |
| |
| # Tests from sub-directories. |
| "//chrome/chrome_cleaner/chrome_utils:unittest_sources", |
| "//chrome/chrome_cleaner/components:unittest_sources", |
| "//chrome/chrome_cleaner/engines/broker:unittest_sources", |
| "//chrome/chrome_cleaner/engines/common:unittest_sources", |
| "//chrome/chrome_cleaner/engines/controllers:unittest_sources", |
| "//chrome/chrome_cleaner/engines/target:unittest_sources", |
| "//chrome/chrome_cleaner/http:unittest_sources", |
| "//chrome/chrome_cleaner/interfaces/typemaps:unittest_sources", |
| "//chrome/chrome_cleaner/ipc:unittest_sources", |
| "//chrome/chrome_cleaner/logging:unittest_sources", |
| "//chrome/chrome_cleaner/os:unittest_sources", |
| "//chrome/chrome_cleaner/parsers/broker:unittest_sources", |
| "//chrome/chrome_cleaner/parsers/json_parser:unittest_sources", |
| "//chrome/chrome_cleaner/parsers/parser_utils:unittest_sources", |
| "//chrome/chrome_cleaner/parsers/shortcut_parser/broker:unittest_sources", |
| "//chrome/chrome_cleaner/parsers/shortcut_parser/target:unittest_sources", |
| "//chrome/chrome_cleaner/parsers/target:unittest_sources", |
| "//chrome/chrome_cleaner/pup_data:unittest_sources", |
| "//chrome/chrome_cleaner/scanner:unittest_sources", |
| "//chrome/chrome_cleaner/settings:unittest_sources", |
| "//chrome/chrome_cleaner/strings:unittest_sources", |
| "//chrome/chrome_cleaner/test:unittest_sources", |
| "//chrome/chrome_cleaner/ui:unittest_sources", |
| "//chrome/chrome_cleaner/zip_archiver:unittest_sources", |
| ] |
| |
| if (is_internal_chrome_cleaner_build) { |
| deps += [ "//chrome_cleaner_internal:unittest_sources" ] |
| } |
| |
| # TODO(crbug.com/949669): Add an integration test of the top-level |
| # executables. For now, just add a dependency on them to make sure they |
| # build. |
| data_deps = [ |
| "//chrome/chrome_cleaner/executables:chrome_cleanup_tool", |
| "//chrome/chrome_cleaner/executables:software_reporter_tool", |
| ] |
| } |