forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
138 lines (120 loc) · 4.81 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# 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("//build/buildflag_header.gni")
import("//chrome/chrome_cleaner/chrome_cleaner_args.gni")
import("//testing/test.gni")
# Nothing outside //chrome/chrome_cleaner can depend on these targets.
visibility = [ "//chrome/chrome_cleaner/*" ]
# Generate a buildflag header so code can check is_official_chrome_cleaner_build.
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [
"IS_INTERNAL_CHROME_CLEANER_BUILD=$is_internal_chrome_cleaner_build",
"IS_OFFICIAL_CHROME_CLEANER_BUILD=$is_official_chrome_cleaner_build",
]
}
group("engine_definitions") {
if (is_internal_chrome_cleaner_build) {
deps = [ "${chrome_cleaner_internal_root}: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_root}: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" ]
deps = [
# Dependencies of the test harness.
":engine_definitions",
":engine_target_factory",
":other_executable_definitions",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/test:test_util",
"//chrome/chrome_cleaner/test:test_uws_catalog",
# 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/ipc:unittest_sources",
"//chrome/chrome_cleaner/logging:unittest_sources",
"//chrome/chrome_cleaner/mojom/typemaps: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:integration_test_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_root}:integration_test_sources",
"${chrome_cleaner_internal_root}:unittest_sources",
]
}
}
group("shipped_binaries") {
# This group is used for network annotation check test.
visibility += [ "//.:shipped_binaries" ]
deps = [
"//chrome/chrome_cleaner/executables:chrome_cleanup_tool",
"//chrome/chrome_cleaner/executables:software_reporter_tool",
]
}
group("chrome_cleaner") {
testonly = true
# Make this target findable from the "all" target used by the builders.
visibility += [ "//.:gn_all" ]
deps = [
":chrome_cleaner_unittests",
":shipped_binaries",
"//chrome/chrome_cleaner/tools:generate_test_uws",
]
if (is_internal_chrome_cleaner_build) {
deps += [
"${chrome_cleaner_internal_root}:build_targets",
"${chrome_cleaner_internal_root}:test_targets",
]
}
}