Support for unpacked ARM packed relocations.
[chromium-blink-merge.git] / base / test / BUILD.gn
blob088f1d5e4300fd264573467a6ec5f989d0b4e6be
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/android/rules.gni")
6 import("//build/config/ui.gni")
8 source_set("test_support") {
9   sources = [
10     "expectations/expectation.cc",
11     "expectations/expectation.h",
12     "expectations/parser.cc",
13     "expectations/parser.h",
14     "gtest_xml_util.cc",
15     "gtest_xml_util.h",
16     "launcher/test_launcher.cc",
17     "launcher/test_launcher.h",
18     "launcher/test_result.cc",
19     "launcher/test_result.h",
20     "launcher/test_results_tracker.cc",
21     "launcher/test_results_tracker.h",
22     "launcher/unit_test_launcher.cc",
23     "launcher/unit_test_launcher.h",
24     "launcher/unit_test_launcher_ios.cc",
25     "mock_chrome_application_mac.h",
26     "mock_chrome_application_mac.mm",
27     "mock_devices_changed_observer.cc",
28     "mock_devices_changed_observer.h",
29     "mock_time_provider.cc",
30     "mock_time_provider.h",
31     "multiprocess_test.cc",
32     "multiprocess_test.h",
33     "multiprocess_test_android.cc",
34     "null_task_runner.cc",
35     "null_task_runner.h",
36     "perf_log.cc",
37     "perf_log.h",
38     "perf_test_suite.cc",
39     "perf_test_suite.h",
40     "perf_time_logger.cc",
41     "perf_time_logger.h",
42     "power_monitor_test_base.cc",
43     "power_monitor_test_base.h",
44     "scoped_locale.cc",
45     "scoped_locale.h",
46     "scoped_path_override.cc",
47     "scoped_path_override.h",
48     "sequenced_task_runner_test_template.cc",
49     "sequenced_task_runner_test_template.h",
50     "sequenced_worker_pool_owner.cc",
51     "sequenced_worker_pool_owner.h",
52     "simple_test_clock.cc",
53     "simple_test_clock.h",
54     "simple_test_tick_clock.cc",
55     "simple_test_tick_clock.h",
56     "statistics_delta_reader.cc",
57     "statistics_delta_reader.h",
58     "task_runner_test_template.cc",
59     "task_runner_test_template.h",
60     "test_file_util.cc",
61     "test_file_util.h",
62     "test_file_util_android.cc",
63     "test_file_util_linux.cc",
64     "test_file_util_mac.cc",
65     "test_file_util_posix.cc",
66     "test_file_util_win.cc",
67     "test_listener_ios.h",
68     "test_listener_ios.mm",
69     "test_pending_task.cc",
70     "test_pending_task.h",
71     "test_process_killer_win.cc",
72     "test_process_killer_win.h",
73     "test_reg_util_win.cc",
74     "test_reg_util_win.h",
75     "test_shortcut_win.cc",
76     "test_shortcut_win.h",
77     "test_simple_task_runner.cc",
78     "test_simple_task_runner.h",
79     "test_suite.cc",
80     "test_suite.h",
81     "test_support_android.cc",
82     "test_support_android.h",
83     "test_support_ios.h",
84     "test_support_ios.mm",
85     "test_switches.cc",
86     "test_switches.h",
87     "test_timeouts.cc",
88     "test_timeouts.h",
89     "thread_test_helper.cc",
90     "thread_test_helper.h",
91     "trace_event_analyzer.cc",
92     "trace_event_analyzer.h",
93     "values_test_util.cc",
94     "values_test_util.h",
95   ]
96   deps = [
97     "//base",
98     "//base/third_party/dynamic_annotations",
99     "//base:i18n",
100     "//base:base_static",
101     "//testing/gmock",
102     "//testing/gtest",
103     "//third_party/libxml"
104   ]
106   if (!is_posix) {
107     sources -= [
108       "scoped_locale.cc",
109       "scoped_locale.h",
110     ]
111   }
112   if (is_ios) {
113     # iOS uses its own unit test launcher.
114     sources -= [ "launcher/unit_test_launcher.cc" ]
116     # Pull in specific Mac files for iOS (which have been filtered out
117     # by file name rules).
118     set_sources_assignment_filter([])
119     sources += [ "test_file_util_mac.cc" ]
120   }
122   if (is_android) {
123     deps += [ ":base_unittests_jni_headers" ]
124   }
127 config("perf_test_config") {
128   defines = [ "PERF_TEST" ]
131 source_set("test_support_perf") {
132   sources = [
133     "run_all_perftests.cc",
134   ]
135   deps = [
136     ":test_support",
137     "//base",
138     "//testing/gtest",
139   ]
141   direct_dependent_configs = [ ":perf_test_config" ]
144 source_set("run_all_unittests") {
145   sources = [
146     "run_all_unittests.cc",
147   ]
148   deps = [
149     ":test_support",
150   ]
153 if (is_android) {
154   generate_jni("base_unittests_jni_headers") {
155     sources = [
156       "android/java/src/org/chromium/base/ContentUriTestUtils.java",
157     ]
158     jni_package = "base"
159   }