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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 | 7 |
8 assert(is_android) | 8 assert(is_android) |
9 | 9 |
10 # These identify targets that have .build_config files (except for android_apk, | 10 # These identify targets that have .build_config files (except for android_apk, |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 rebased_renaming_sources = | 403 rebased_renaming_sources = |
404 rebase_path(invoker.renaming_sources, root_build_dir) | 404 rebase_path(invoker.renaming_sources, root_build_dir) |
405 args += [ "--renaming-sources=$rebased_renaming_sources" ] | 405 args += [ "--renaming-sources=$rebased_renaming_sources" ] |
406 | 406 |
407 renaming_destinations = invoker.renaming_destinations | 407 renaming_destinations = invoker.renaming_destinations |
408 args += [ "--renaming-destinations=$renaming_destinations" ] | 408 args += [ "--renaming-destinations=$renaming_destinations" ] |
409 } | 409 } |
410 } | 410 } |
411 } | 411 } |
412 | 412 |
| 413 template("device_isolate") { |
| 414 testonly = true |
| 415 _runtime_deps_file = "$target_gen_dir/$target_name.runtime_deps" |
| 416 group("${target_name}__write_deps") { |
| 417 forward_variables_from(invoker, |
| 418 [ |
| 419 "data", |
| 420 "data_deps", |
| 421 "deps", |
| 422 "public_deps", |
| 423 ]) |
| 424 write_runtime_deps = _runtime_deps_file |
| 425 } |
| 426 |
| 427 action(target_name) { |
| 428 script = "//build/android/gn/generate_isolate.py" |
| 429 inputs = [ |
| 430 _runtime_deps_file, |
| 431 ] |
| 432 outputs = [ |
| 433 invoker.output, |
| 434 ] |
| 435 args = [ |
| 436 "--output-directory=.", |
| 437 "--out-file", |
| 438 rebase_path(invoker.output, root_build_dir), |
| 439 "--runtime-deps-file", |
| 440 rebase_path(_runtime_deps_file, root_build_dir), |
| 441 "--apply-android-filters", |
| 442 "--apply-device-filters", |
| 443 ] |
| 444 _assert_no_odd_data = |
| 445 defined(invoker.assert_no_odd_data) && invoker.assert_no_odd_data |
| 446 if (_assert_no_odd_data) { |
| 447 args += [ "--assert-no-odd-data" ] |
| 448 } |
| 449 if (defined(invoker.command)) { |
| 450 _isolate_dir = get_path_info(invoker.output, "dir") |
| 451 args += [ |
| 452 "--command", |
| 453 rebase_path(invoker.command, _isolate_dir), |
| 454 ] |
| 455 } |
| 456 deps = [ |
| 457 ":${invoker.target_name}__write_deps", |
| 458 ] |
| 459 } |
| 460 } |
| 461 |
413 # Generates a script in the output bin directory which runs the test | 462 # Generates a script in the output bin directory which runs the test |
414 # target using the test runner script in build/android/test_runner.py. | 463 # target using the test runner script in build/android/test_runner.py. |
415 template("test_runner_script") { | 464 template("test_runner_script") { |
416 testonly = true | 465 testonly = true |
417 _test_name = invoker.test_name | 466 _test_name = invoker.test_name |
418 _test_type = invoker.test_type | 467 _test_type = invoker.test_type |
419 _incremental_install = | 468 _incremental_install = |
420 defined(invoker.incremental_install) && invoker.incremental_install | 469 defined(invoker.incremental_install) && invoker.incremental_install |
421 | 470 |
422 action(target_name) { | 471 action(target_name) { |
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2580 outputs = [ | 2629 outputs = [ |
2581 depfile, | 2630 depfile, |
2582 invoker.out_manifest, | 2631 invoker.out_manifest, |
2583 ] | 2632 ] |
2584 inputs = [ | 2633 inputs = [ |
2585 invoker.main_manifest, | 2634 invoker.main_manifest, |
2586 ] | 2635 ] |
2587 } | 2636 } |
2588 } | 2637 } |
2589 } | 2638 } |
OLD | NEW |