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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 action(target_name) { | 82 action(target_name) { |
83 set_sources_assignment_filter([]) | 83 set_sources_assignment_filter([]) |
84 build_config = invoker.build_config | 84 build_config = invoker.build_config |
85 | 85 |
86 assert(type == "android_apk" || type == "java_library" || | 86 assert(type == "android_apk" || type == "java_library" || |
87 type == "android_resources" || type == "deps_dex" || | 87 type == "android_resources" || type == "deps_dex" || |
88 type == "dist_jar" || type == "android_assets" || | 88 type == "dist_jar" || type == "android_assets" || |
89 type == "resource_rewriter" || type == "java_binary" || | 89 type == "resource_rewriter" || type == "java_binary" || |
90 type == "group" || type == "java_prebuilt" || type == "junit_binary") | 90 type == "group" || type == "java_prebuilt") |
91 | 91 |
92 forward_variables_from(invoker, | 92 forward_variables_from(invoker, |
93 [ | 93 [ |
94 "deps", | 94 "deps", |
95 "testonly", | 95 "testonly", |
96 ]) | 96 ]) |
97 if (!defined(deps)) { | 97 if (!defined(deps)) { |
98 deps = [] | 98 deps = [] |
99 } | 99 } |
100 | 100 |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 if (emma_coverage) { | 557 if (emma_coverage) { |
558 # Set a default coverage output directory (can be overridden by user | 558 # Set a default coverage output directory (can be overridden by user |
559 # passing the same flag). | 559 # passing the same flag). |
560 test_runner_args += [ | 560 test_runner_args += [ |
561 "--coverage-dir", | 561 "--coverage-dir", |
562 rebase_path("$root_out_dir/coverage", root_build_dir), | 562 rebase_path("$root_out_dir/coverage", root_build_dir), |
563 ] | 563 ] |
564 } | 564 } |
565 } else if (_test_type == "junit") { | 565 } else if (_test_type == "junit") { |
566 assert(defined(invoker.test_suite)) | 566 assert(defined(invoker.test_suite)) |
567 | |
568 test_runner_args += [ | 567 test_runner_args += [ |
569 "--test-suite", | 568 "--test-suite", |
570 invoker.test_suite, | 569 invoker.test_suite, |
571 ] | 570 ] |
572 if (defined(invoker.android_manifest_path)) { | |
573 test_runner_args += [ | |
574 "--android-manifest-path", | |
575 rebase_path(invoker.android_manifest_path, root_build_dir), | |
576 ] | |
577 } | |
578 | |
579 if (defined(invoker.package_name)) { | |
580 test_runner_args += [ | |
581 "--package-name", | |
582 invoker.package_name, | |
583 ] | |
584 | |
585 deps += [ ":${invoker.test_suite}__build_config" ] | |
586 _junit_binary_build_config = | |
587 "${target_gen_dir}/${invoker.test_suite}.build_config" | |
588 _rebased_build_config = | |
589 rebase_path("$_junit_binary_build_config", root_build_dir) | |
590 test_runner_args += [ | |
591 "--resource-zips", | |
592 "@FileArg($_rebased_build_config:resources:dependency_zips)", | |
593 ] | |
594 } | |
595 | |
596 test_runner_args += [ | |
597 "--robolectric-runtime-deps-dir", | |
598 rebase_path("$root_build_dir/lib.java/third_party/robolectric", | |
599 root_build_dir), | |
600 ] | |
601 } else if (_test_type == "linker") { | 571 } else if (_test_type == "linker") { |
602 test_runner_args += [ | 572 test_runner_args += [ |
603 "--test-apk", | 573 "--test-apk", |
604 "@FileArg($_rebased_apk_build_config:deps_info:apk_path)", | 574 "@FileArg($_rebased_apk_build_config:deps_info:apk_path)", |
605 ] | 575 ] |
606 } else { | 576 } else { |
607 assert(false, "Invalid test type: $_test_type.") | 577 assert(false, "Invalid test type: $_test_type.") |
608 } | 578 } |
609 | 579 |
610 if (defined(invoker.additional_apks)) { | 580 if (defined(invoker.additional_apks)) { |
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 rebase_path(root_build_dir, root_build_dir), | 2777 rebase_path(root_build_dir, root_build_dir), |
2808 "--packed-libraries-dir", | 2778 "--packed-libraries-dir", |
2809 rebase_path(_packed_libraries_dir, root_build_dir), | 2779 rebase_path(_packed_libraries_dir, root_build_dir), |
2810 "--libraries=${invoker.libraries_filearg}", | 2780 "--libraries=${invoker.libraries_filearg}", |
2811 "--filelistjson", | 2781 "--filelistjson", |
2812 rebase_path(invoker.file_list_json, root_build_dir), | 2782 rebase_path(invoker.file_list_json, root_build_dir), |
2813 ] | 2783 ] |
2814 } | 2784 } |
2815 } | 2785 } |
2816 } | 2786 } |
OLD | NEW |