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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 } else if (_test_type == "gtest") { | 519 } else if (_test_type == "gtest") { |
520 assert( | 520 assert( |
521 defined(invoker.executable_dist_dir), | 521 defined(invoker.executable_dist_dir), |
522 "Must define either apk_target or executable_dist_dir for test_runner_
script()") | 522 "Must define either apk_target or executable_dist_dir for test_runner_
script()") |
523 test_runner_args += [ | 523 test_runner_args += [ |
524 "--executable-dist-dir", | 524 "--executable-dist-dir", |
525 rebase_path(invoker.executable_dist_dir, root_build_dir), | 525 rebase_path(invoker.executable_dist_dir, root_build_dir), |
526 ] | 526 ] |
527 } | 527 } |
528 | 528 |
| 529 _device_test = true |
529 if (_test_type == "gtest") { | 530 if (_test_type == "gtest") { |
530 assert(defined(invoker.test_suite)) | 531 assert(defined(invoker.test_suite)) |
531 test_runner_args += [ | 532 test_runner_args += [ |
532 "--suite", | 533 "--suite", |
533 invoker.test_suite, | 534 invoker.test_suite, |
534 ] | 535 ] |
535 } else if (_test_type == "instrumentation") { | 536 } else if (_test_type == "instrumentation") { |
536 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:apk_path)" | 537 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:apk_path)" |
537 if (_incremental_install) { | 538 if (_incremental_install) { |
538 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:incremental_a
pk_path)" | 539 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:incremental_a
pk_path)" |
(...skipping 24 matching lines...) Expand all Loading... |
563 "--coverage-dir", | 564 "--coverage-dir", |
564 rebase_path("$root_out_dir/coverage", root_build_dir), | 565 rebase_path("$root_out_dir/coverage", root_build_dir), |
565 ] | 566 ] |
566 } | 567 } |
567 } else if (_test_type == "junit") { | 568 } else if (_test_type == "junit") { |
568 assert(defined(invoker.test_suite)) | 569 assert(defined(invoker.test_suite)) |
569 test_runner_args += [ | 570 test_runner_args += [ |
570 "--test-suite", | 571 "--test-suite", |
571 invoker.test_suite, | 572 invoker.test_suite, |
572 ] | 573 ] |
| 574 _device_test = false |
573 } else if (_test_type == "linker") { | 575 } else if (_test_type == "linker") { |
574 test_runner_args += [ | 576 test_runner_args += [ |
575 "--test-apk", | 577 "--test-apk", |
576 "@FileArg($_rebased_apk_build_config:deps_info:apk_path)", | 578 "@FileArg($_rebased_apk_build_config:deps_info:apk_path)", |
577 ] | 579 ] |
578 } else { | 580 } else { |
579 assert(false, "Invalid test type: $_test_type.") | 581 assert(false, "Invalid test type: $_test_type.") |
580 } | 582 } |
581 | 583 |
582 if (defined(invoker.additional_apks)) { | 584 if (defined(invoker.additional_apks)) { |
(...skipping 19 matching lines...) Expand all Loading... |
602 "@FileArg($_rebased_apk_build_config:deps_info:incremental_install_scrip
t_path)", | 604 "@FileArg($_rebased_apk_build_config:deps_info:incremental_install_scrip
t_path)", |
603 ] | 605 ] |
604 if (defined(invoker.apk_under_test)) { | 606 if (defined(invoker.apk_under_test)) { |
605 test_runner_args += [ | 607 test_runner_args += [ |
606 "--apk-under-test-incremental-install-script", | 608 "--apk-under-test-incremental-install-script", |
607 "@FileArg($_rebased_apk_under_test_build_config:deps_info:incremental_
install_script_path)", | 609 "@FileArg($_rebased_apk_under_test_build_config:deps_info:incremental_
install_script_path)", |
608 ] | 610 ] |
609 } | 611 } |
610 test_runner_args += [ "--fast-local-dev" ] | 612 test_runner_args += [ "--fast-local-dev" ] |
611 } | 613 } |
612 if (is_asan) { | 614 if (_device_test && is_asan) { |
613 test_runner_args += [ "--tool=asan" ] | 615 test_runner_args += [ "--tool=asan" ] |
614 } | 616 } |
615 | 617 |
616 generated_script = "$root_build_dir/bin/run_${_test_name}" | 618 generated_script = "$root_build_dir/bin/run_${_test_name}" |
617 outputs = [ | 619 outputs = [ |
618 generated_script, | 620 generated_script, |
619 ] | 621 ] |
620 data += [ generated_script ] | 622 data += [ generated_script ] |
621 | 623 |
622 args = [ | 624 args = [ |
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2790 rebase_path(root_build_dir, root_build_dir), | 2792 rebase_path(root_build_dir, root_build_dir), |
2791 "--packed-libraries-dir", | 2793 "--packed-libraries-dir", |
2792 rebase_path(_packed_libraries_dir, root_build_dir), | 2794 rebase_path(_packed_libraries_dir, root_build_dir), |
2793 "--libraries=${invoker.libraries_filearg}", | 2795 "--libraries=${invoker.libraries_filearg}", |
2794 "--filelistjson", | 2796 "--filelistjson", |
2795 rebase_path(invoker.file_list_json, root_build_dir), | 2797 rebase_path(invoker.file_list_json, root_build_dir), |
2796 ] | 2798 ] |
2797 } | 2799 } |
2798 } | 2800 } |
2799 } | 2801 } |
OLD | NEW |