| OLD | NEW |
| 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/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
| 7 | 7 |
| 8 if (is_android) { | 8 if (is_android) { |
| 9 import("//build/config/android/rules.gni") | 9 import("//build/config/android/rules.gni") |
| 10 } | 10 } |
| 11 | 11 |
| 12 static_library("test_config") { | 12 static_library("test_config") { |
| 13 testonly = true | 13 testonly = true |
| 14 sources = [ | 14 sources = [ |
| 15 "test_switches.cc", | 15 "test_switches.cc", |
| 16 "test_switches.h", | 16 "test_switches.h", |
| 17 "test_timeouts.cc", | 17 "test_timeouts.cc", |
| 18 "test_timeouts.h", | 18 "test_timeouts.h", |
| 19 ] | 19 ] |
| 20 deps = [ | 20 deps = [ |
| 21 "//base", | 21 "//base", |
| 22 ] | 22 ] |
| 23 } | 23 } |
| 24 | 24 |
| 25 if (is_android) { |
| 26 # This target is needed for components on Android depending on |
| 27 # base:test_support that do not define a main function. This is because |
| 28 # multiprocess support on Android requires a main function (the one invoked on |
| 29 # the child process). |
| 30 static_library("test_support_main_stub") { |
| 31 testonly = true |
| 32 if (is_component_build) { |
| 33 sources = [ |
| 34 "main_stub.cc", |
| 35 ] |
| 36 deps = [ |
| 37 "//base", |
| 38 ] |
| 39 } |
| 40 } |
| 41 } |
| 42 |
| 25 static_library("test_support") { | 43 static_library("test_support") { |
| 26 testonly = true | 44 testonly = true |
| 27 sources = [ | 45 sources = [ |
| 28 "../trace_event/trace_config_memory_test_util.h", | 46 "../trace_event/trace_config_memory_test_util.h", |
| 29 "android/java_handler_thread_for_testing.cc", | 47 "android/java_handler_thread_for_testing.cc", |
| 30 "android/java_handler_thread_for_testing.h", | 48 "android/java_handler_thread_for_testing.h", |
| 49 "android/multiprocess_test_client_service.cc", |
| 50 "android/test_support_jni_registrar.cc", |
| 51 "android/test_support_jni_registrar.h", |
| 31 "android/test_system_message_handler_link_android.cc", | 52 "android/test_system_message_handler_link_android.cc", |
| 32 "android/test_system_message_handler_link_android.h", | 53 "android/test_system_message_handler_link_android.h", |
| 33 "fuzzed_data_provider.cc", | 54 "fuzzed_data_provider.cc", |
| 34 "fuzzed_data_provider.h", | 55 "fuzzed_data_provider.h", |
| 35 "gtest_util.cc", | 56 "gtest_util.cc", |
| 36 "gtest_util.h", | 57 "gtest_util.h", |
| 37 "gtest_xml_unittest_result_printer.cc", | 58 "gtest_xml_unittest_result_printer.cc", |
| 38 "gtest_xml_unittest_result_printer.h", | 59 "gtest_xml_unittest_result_printer.h", |
| 39 "gtest_xml_util.cc", | 60 "gtest_xml_util.cc", |
| 40 "gtest_xml_util.h", | 61 "gtest_xml_util.h", |
| 41 "histogram_tester.cc", | 62 "histogram_tester.cc", |
| 42 "histogram_tester.h", | 63 "histogram_tester.h", |
| 43 "icu_test_util.cc", | 64 "icu_test_util.cc", |
| 44 "icu_test_util.h", | 65 "icu_test_util.h", |
| 45 "ios/wait_util.h", | 66 "ios/wait_util.h", |
| 46 "ios/wait_util.mm", | 67 "ios/wait_util.mm", |
| 47 "launcher/test_result.cc", | 68 "launcher/test_result.cc", |
| 48 "launcher/test_result.h", | 69 "launcher/test_result.h", |
| 49 "launcher/test_results_tracker.h", | 70 "launcher/test_results_tracker.h", |
| 50 "launcher/unit_test_launcher.h", | 71 "launcher/unit_test_launcher.h", |
| 51 "mock_chrome_application_mac.h", | 72 "mock_chrome_application_mac.h", |
| 52 "mock_chrome_application_mac.mm", | 73 "mock_chrome_application_mac.mm", |
| 53 "mock_devices_changed_observer.cc", | 74 "mock_devices_changed_observer.cc", |
| 54 "mock_devices_changed_observer.h", | 75 "mock_devices_changed_observer.h", |
| 55 "mock_entropy_provider.cc", | 76 "mock_entropy_provider.cc", |
| 56 "mock_entropy_provider.h", | 77 "mock_entropy_provider.h", |
| 57 "mock_log.cc", | 78 "mock_log.cc", |
| 58 "mock_log.h", | 79 "mock_log.h", |
| 80 "multiprocess_test.cc", |
| 59 "multiprocess_test.h", | 81 "multiprocess_test.h", |
| 82 "multiprocess_test_android.cc", |
| 60 "null_task_runner.cc", | 83 "null_task_runner.cc", |
| 61 "null_task_runner.h", | 84 "null_task_runner.h", |
| 62 "opaque_ref_counted.cc", | 85 "opaque_ref_counted.cc", |
| 63 "opaque_ref_counted.h", | 86 "opaque_ref_counted.h", |
| 64 "perf_log.cc", | 87 "perf_log.cc", |
| 65 "perf_log.h", | 88 "perf_log.h", |
| 66 "perf_test_suite.cc", | 89 "perf_test_suite.cc", |
| 67 "perf_test_suite.h", | 90 "perf_test_suite.h", |
| 68 "perf_time_logger.cc", | 91 "perf_time_logger.cc", |
| 69 "perf_time_logger.h", | 92 "perf_time_logger.h", |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if (is_ios) { | 162 if (is_ios) { |
| 140 sources += [ "launcher/unit_test_launcher_ios.cc" ] | 163 sources += [ "launcher/unit_test_launcher_ios.cc" ] |
| 141 } else if (!is_nacl_nonsfi) { | 164 } else if (!is_nacl_nonsfi) { |
| 142 sources += [ | 165 sources += [ |
| 143 "launcher/test_launcher.cc", | 166 "launcher/test_launcher.cc", |
| 144 "launcher/test_launcher.h", | 167 "launcher/test_launcher.h", |
| 145 "launcher/test_launcher_tracer.cc", | 168 "launcher/test_launcher_tracer.cc", |
| 146 "launcher/test_launcher_tracer.h", | 169 "launcher/test_launcher_tracer.h", |
| 147 "launcher/test_results_tracker.cc", | 170 "launcher/test_results_tracker.cc", |
| 148 "launcher/unit_test_launcher.cc", | 171 "launcher/unit_test_launcher.cc", |
| 149 "multiprocess_test.cc", | |
| 150 "multiprocess_test_android.cc", | |
| 151 ] | 172 ] |
| 152 } | 173 } |
| 153 | 174 |
| 154 configs += [ "//build/config:precompiled_headers" ] | 175 configs += [ "//build/config:precompiled_headers" ] |
| 155 | 176 |
| 156 data = [ | 177 data = [ |
| 157 # The isolate needs this script for setting up the test. It's not actually | 178 # The isolate needs this script for setting up the test. It's not actually |
| 158 # needed to run this target locally. | 179 # needed to run this target locally. |
| 159 "//testing/test_env.py", | 180 "//testing/test_env.py", |
| 160 ] | 181 ] |
| (...skipping 23 matching lines...) Expand all Loading... |
| 184 set_sources_assignment_filter([]) | 205 set_sources_assignment_filter([]) |
| 185 sources += [ "test_file_util_mac.cc" ] | 206 sources += [ "test_file_util_mac.cc" ] |
| 186 set_sources_assignment_filter(sources_assignment_filter) | 207 set_sources_assignment_filter(sources_assignment_filter) |
| 187 } | 208 } |
| 188 | 209 |
| 189 if (is_mac) { | 210 if (is_mac) { |
| 190 libs = [ "AppKit.framework" ] | 211 libs = [ "AppKit.framework" ] |
| 191 } | 212 } |
| 192 | 213 |
| 193 if (is_android) { | 214 if (is_android) { |
| 194 deps += [ ":base_unittests_jni_headers" ] | 215 deps += [ |
| 216 ":base_unittests_jni_headers", |
| 217 ":test_support_jni_headers", |
| 218 ] |
| 219 public_deps += [ ":test_support_java" ] |
| 195 } | 220 } |
| 196 | 221 |
| 197 if (is_nacl_nonsfi) { | 222 if (is_nacl_nonsfi) { |
| 198 sources += [ | 223 sources += [ |
| 199 "launcher/test_launcher.h", | 224 "launcher/test_launcher.h", |
| 200 "launcher/test_result.h", | 225 "launcher/test_result.h", |
| 201 "launcher/unit_test_launcher.h", | 226 "launcher/unit_test_launcher.h", |
| 202 "launcher/unit_test_launcher_nacl_nonsfi.cc", | 227 "launcher/unit_test_launcher_nacl_nonsfi.cc", |
| 203 ] | 228 ] |
| 204 sources -= [ | 229 sources -= [ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 345 |
| 321 if (is_android) { | 346 if (is_android) { |
| 322 generate_jni("base_unittests_jni_headers") { | 347 generate_jni("base_unittests_jni_headers") { |
| 323 sources = [ | 348 sources = [ |
| 324 "android/java/src/org/chromium/base/ContentUriTestUtils.java", | 349 "android/java/src/org/chromium/base/ContentUriTestUtils.java", |
| 325 "android/java/src/org/chromium/base/TestSystemMessageHandler.java", | 350 "android/java/src/org/chromium/base/TestSystemMessageHandler.java", |
| 326 "android/java/src/org/chromium/base/TestUiThread.java", | 351 "android/java/src/org/chromium/base/TestUiThread.java", |
| 327 ] | 352 ] |
| 328 jni_package = "base" | 353 jni_package = "base" |
| 329 } | 354 } |
| 355 |
| 356 generate_jni("test_support_jni_headers") { |
| 357 sources = [ |
| 358 "android/java/src/org/chromium/base/MainReturnCodeResult.java", |
| 359 "android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java", |
| 360 "android/java/src/org/chromium/base/MultiprocessTestClientService.java", |
| 361 ] |
| 362 jni_package = "base" |
| 363 } |
| 364 |
| 365 android_library("test_support_java") { |
| 366 testonly = true |
| 367 deps = [ |
| 368 "//base:base_java", |
| 369 "//third_party/android_tools:android_support_annotations_java", |
| 370 "//third_party/jsr-305:jsr_305_javalib", |
| 371 ] |
| 372 srcjar_deps = [ ":test_support_java_aidl" ] |
| 373 java_files = [ |
| 374 "android/java/src/org/chromium/base/FileDescriptorInfo.java", |
| 375 "android/java/src/org/chromium/base/MainReturnCodeResult.java", |
| 376 "android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java", |
| 377 "android/java/src/org/chromium/base/MultiprocessTestClientService.java", |
| 378 "android/java/src/org/chromium/base/MultiprocessTestClientService0.java", |
| 379 "android/java/src/org/chromium/base/MultiprocessTestClientService1.java", |
| 380 "android/java/src/org/chromium/base/MultiprocessTestClientService2.java", |
| 381 "android/java/src/org/chromium/base/MultiprocessTestClientService3.java", |
| 382 "android/java/src/org/chromium/base/MultiprocessTestClientService4.java", |
| 383 ] |
| 384 } |
| 385 |
| 386 android_aidl("test_support_java_aidl") { |
| 387 testonly = true |
| 388 import_include = "android/java/src" |
| 389 sources = [ |
| 390 "android/java/src/org/chromium/base/ITestClient.aidl", |
| 391 ] |
| 392 } |
| 330 } | 393 } |
| OLD | NEW |