| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # Do not add any imports to non-//build directories here. | 5 # Do not add any imports to non-//build directories here. |
| 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. | 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. |
| 7 import("//build_overrides/build.gni") | 7 import("//build_overrides/build.gni") |
| 8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
| 9 import("//build/config/dcheck_always_on.gni") | 9 import("//build/config/dcheck_always_on.gni") |
| 10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 action(target_name) { | 84 action(target_name) { |
| 85 set_sources_assignment_filter([]) | 85 set_sources_assignment_filter([]) |
| 86 build_config = invoker.build_config | 86 build_config = invoker.build_config |
| 87 | 87 |
| 88 assert(type == "android_apk" || type == "java_library" || | 88 assert(type == "android_apk" || type == "java_library" || |
| 89 type == "android_resources" || type == "deps_dex" || | 89 type == "android_resources" || type == "deps_dex" || |
| 90 type == "dist_jar" || type == "android_assets" || | 90 type == "dist_jar" || type == "android_assets" || |
| 91 type == "resource_rewriter" || type == "java_binary" || | 91 type == "resource_rewriter" || type == "java_binary" || |
| 92 type == "group" || type == "java_prebuilt" || type == "junit_binary") | 92 type == "group" || type == "java_prebuilt") |
| 93 | 93 |
| 94 forward_variables_from(invoker, | 94 forward_variables_from(invoker, |
| 95 [ | 95 [ |
| 96 "deps", | 96 "deps", |
| 97 "testonly", | 97 "testonly", |
| 98 ]) | 98 ]) |
| 99 if (!defined(deps)) { | 99 if (!defined(deps)) { |
| 100 deps = [] | 100 deps = [] |
| 101 } | 101 } |
| 102 | 102 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 if (emma_coverage) { | 560 if (emma_coverage) { |
| 561 # Set a default coverage output directory (can be overridden by user | 561 # Set a default coverage output directory (can be overridden by user |
| 562 # passing the same flag). | 562 # passing the same flag). |
| 563 test_runner_args += [ | 563 test_runner_args += [ |
| 564 "--coverage-dir", | 564 "--coverage-dir", |
| 565 rebase_path("$root_out_dir/coverage", root_build_dir), | 565 rebase_path("$root_out_dir/coverage", root_build_dir), |
| 566 ] | 566 ] |
| 567 } | 567 } |
| 568 } else if (_test_type == "junit") { | 568 } else if (_test_type == "junit") { |
| 569 assert(defined(invoker.test_suite)) | 569 assert(defined(invoker.test_suite)) |
| 570 _device_test = false | |
| 571 test_runner_args += [ | 570 test_runner_args += [ |
| 572 "--test-suite", | 571 "--test-suite", |
| 573 invoker.test_suite, | 572 invoker.test_suite, |
| 574 ] | 573 ] |
| 575 if (defined(invoker.android_manifest_path)) { | 574 _device_test = false |
| 576 test_runner_args += [ | |
| 577 "--android-manifest-path", | |
| 578 rebase_path(invoker.android_manifest_path, root_build_dir), | |
| 579 ] | |
| 580 } | |
| 581 | |
| 582 if (defined(invoker.package_name)) { | |
| 583 test_runner_args += [ | |
| 584 "--package-name", | |
| 585 invoker.package_name, | |
| 586 ] | |
| 587 | |
| 588 deps += [ ":${invoker.test_suite}__build_config" ] | |
| 589 _junit_binary_build_config = | |
| 590 "${target_gen_dir}/${invoker.test_suite}.build_config" | |
| 591 _rebased_build_config = | |
| 592 rebase_path("$_junit_binary_build_config", root_build_dir) | |
| 593 test_runner_args += [ | |
| 594 "--resource-zips", | |
| 595 "@FileArg($_rebased_build_config:resources:dependency_zips)", | |
| 596 ] | |
| 597 } | |
| 598 | |
| 599 test_runner_args += [ | |
| 600 "--robolectric-runtime-deps-dir", | |
| 601 rebase_path("$root_build_dir/lib.java/third_party/robolectric", | |
| 602 root_build_dir), | |
| 603 ] | |
| 604 } else if (_test_type == "linker") { | 575 } else if (_test_type == "linker") { |
| 605 test_runner_args += [ | 576 test_runner_args += [ |
| 606 "--test-apk", | 577 "--test-apk", |
| 607 "@FileArg($_rebased_apk_build_config:deps_info:apk_path)", | 578 "@FileArg($_rebased_apk_build_config:deps_info:apk_path)", |
| 608 ] | 579 ] |
| 609 } else { | 580 } else { |
| 610 assert(false, "Invalid test type: $_test_type.") | 581 assert(false, "Invalid test type: $_test_type.") |
| 611 } | 582 } |
| 612 | 583 |
| 613 if (defined(invoker.additional_apks)) { | 584 if (defined(invoker.additional_apks)) { |
| (...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2876 rebase_path(root_build_dir, root_build_dir), | 2847 rebase_path(root_build_dir, root_build_dir), |
| 2877 "--packed-libraries-dir", | 2848 "--packed-libraries-dir", |
| 2878 rebase_path(_packed_libraries_dir, root_build_dir), | 2849 rebase_path(_packed_libraries_dir, root_build_dir), |
| 2879 "--libraries=${invoker.libraries_filearg}", | 2850 "--libraries=${invoker.libraries_filearg}", |
| 2880 "--filelistjson", | 2851 "--filelistjson", |
| 2881 rebase_path(invoker.file_list_json, root_build_dir), | 2852 rebase_path(invoker.file_list_json, root_build_dir), |
| 2882 ] | 2853 ] |
| 2883 } | 2854 } |
| 2884 } | 2855 } |
| 2885 } | 2856 } |
| OLD | NEW |