Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: base/test/BUILD.gn

Issue 288203003: Hook up base unit tests and allocator to GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: tfarina review, android build fix Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/rules.gni")
5 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
6 7
7 source_set("test_support") { 8 source_set("test_support") {
8 sources = [ 9 sources = [
9 "expectations/expectation.cc", 10 "expectations/expectation.cc",
10 "expectations/expectation.h", 11 "expectations/expectation.h",
11 "expectations/parser.cc", 12 "expectations/parser.cc",
12 "expectations/parser.h", 13 "expectations/parser.h",
13 "gtest_xml_util.cc", 14 "gtest_xml_util.cc",
14 "gtest_xml_util.h", 15 "gtest_xml_util.h",
(...skipping 30 matching lines...) Expand all
45 "scoped_path_override.cc", 46 "scoped_path_override.cc",
46 "scoped_path_override.h", 47 "scoped_path_override.h",
47 "sequenced_task_runner_test_template.cc", 48 "sequenced_task_runner_test_template.cc",
48 "sequenced_task_runner_test_template.h", 49 "sequenced_task_runner_test_template.h",
49 "sequenced_worker_pool_owner.cc", 50 "sequenced_worker_pool_owner.cc",
50 "sequenced_worker_pool_owner.h", 51 "sequenced_worker_pool_owner.h",
51 "simple_test_clock.cc", 52 "simple_test_clock.cc",
52 "simple_test_clock.h", 53 "simple_test_clock.h",
53 "simple_test_tick_clock.cc", 54 "simple_test_tick_clock.cc",
54 "simple_test_tick_clock.h", 55 "simple_test_tick_clock.h",
56 "statistics_delta_reader.cc",
57 "statistics_delta_reader.h",
55 "task_runner_test_template.cc", 58 "task_runner_test_template.cc",
56 "task_runner_test_template.h", 59 "task_runner_test_template.h",
57 "test_file_util.cc", 60 "test_file_util.cc",
58 "test_file_util.h", 61 "test_file_util.h",
62 "test_file_util_android.cc",
59 "test_file_util_linux.cc", 63 "test_file_util_linux.cc",
60 "test_file_util_mac.cc", 64 "test_file_util_mac.cc",
61 "test_file_util_posix.cc", 65 "test_file_util_posix.cc",
62 "test_file_util_win.cc", 66 "test_file_util_win.cc",
63 "test_listener_ios.h", 67 "test_listener_ios.h",
64 "test_listener_ios.mm", 68 "test_listener_ios.mm",
65 "test_pending_task.cc", 69 "test_pending_task.cc",
66 "test_pending_task.h", 70 "test_pending_task.h",
67 "test_process_killer_win.cc", 71 "test_process_killer_win.cc",
68 "test_process_killer_win.h", 72 "test_process_killer_win.h",
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 111 }
108 if (is_ios) { 112 if (is_ios) {
109 # iOS uses its own unit test launcher. 113 # iOS uses its own unit test launcher.
110 sources -= [ "launcher/unit_test_launcher.cc" ] 114 sources -= [ "launcher/unit_test_launcher.cc" ]
111 115
112 # Pull in specific Mac files for iOS (which have been filtered out 116 # Pull in specific Mac files for iOS (which have been filtered out
113 # by file name rules). 117 # by file name rules).
114 set_sources_assignment_filter([]) 118 set_sources_assignment_filter([])
115 sources += [ "test_file_util_mac.cc" ] 119 sources += [ "test_file_util_mac.cc" ]
116 } 120 }
117 if (toolkit_uses_gtk) { 121
118 configs += [ "//build/config/linux:gtk" ] 122 if (is_android) {
123 deps += [ ":base_unittests_jni_headers" ]
119 } 124 }
120 } 125 }
121 126
122 config("perf_test_config") { 127 config("perf_test_config") {
123 defines = [ "PERF_TEST" ] 128 defines = [ "PERF_TEST" ]
124 } 129 }
125 130
126 static_library("test_support_perf") { 131 static_library("test_support_perf") {
127 sources = [ 132 sources = [
128 "run_all_perftests.cc", 133 "run_all_perftests.cc",
129 ] 134 ]
130 deps = [ 135 deps = [
131 ":test_support", 136 ":test_support",
132 "//base", 137 "//base",
133 "//testing/gtest", 138 "//testing/gtest",
134 ] 139 ]
135 140
136 direct_dependent_configs = [ ":perf_test_config" ] 141 direct_dependent_configs = [ ":perf_test_config" ]
137
138 if (toolkit_uses_gtk) {
139 configs += [ "//build/config/linux:gtk" ]
140 }
141 } 142 }
142 143
143 source_set("run_all_unittests") { 144 source_set("run_all_unittests") {
144 sources = [ 145 sources = [
145 "run_all_unittests.cc", 146 "run_all_unittests.cc",
146 ] 147 ]
147 deps = [ 148 deps = [
148 ":test_support", 149 ":test_support",
149 ] 150 ]
150 } 151 }
152
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 }
160 }
OLDNEW
« base/allocator/BUILD.gn ('K') | « base/allocator/BUILD.gn ('k') | build/config/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698