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 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
9 | 9 |
10 assert(is_android) | 10 assert(is_android) |
(...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2088 forward_variables_from(invoker, | 2088 forward_variables_from(invoker, |
2089 [ | 2089 [ |
2090 "data_deps", | 2090 "data_deps", |
2091 "deps", | 2091 "deps", |
2092 ]) | 2092 ]) |
2093 | 2093 |
2094 script = "//build/android/gyp/create_test_runner_script.py" | 2094 script = "//build/android/gyp/create_test_runner_script.py" |
2095 depfile = "$target_gen_dir/$target_name.d" | 2095 depfile = "$target_gen_dir/$target_name.d" |
2096 | 2096 |
2097 data_deps += [ "//build/android:test_runner_py" ] | 2097 data_deps += [ "//build/android:test_runner_py" ] |
2098 data = [] | |
2099 | 2098 |
2100 test_runner_args = [ | 2099 test_runner_args = [ |
2101 _test_type, | 2100 _test_type, |
2102 "--output-directory", | 2101 "--output-directory", |
2103 rebase_path(root_build_dir, root_build_dir), | 2102 rebase_path(root_build_dir, root_build_dir), |
2104 ] | 2103 ] |
2105 | 2104 |
2106 # apk_target is not used for native executable tests | 2105 # apk_target is not used for native executable tests |
2107 # (e.g. breakpad_unittests). | 2106 # (e.g. breakpad_unittests). |
2108 if (defined(invoker.apk_target)) { | 2107 if (defined(invoker.apk_target)) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 _build_config = get_label_info(additional_apk, "target_gen_dir") + "/" + | 2172 _build_config = get_label_info(additional_apk, "target_gen_dir") + "/" + |
2174 get_label_info(additional_apk, "name") + ".build_config" | 2173 get_label_info(additional_apk, "name") + ".build_config" |
2175 _rebased_build_config = rebase_path(_build_config, root_build_dir) | 2174 _rebased_build_config = rebase_path(_build_config, root_build_dir) |
2176 test_runner_args += [ | 2175 test_runner_args += [ |
2177 "--additional-apk", | 2176 "--additional-apk", |
2178 "@FileArg($_rebased_build_config:deps_info:apk_path)", | 2177 "@FileArg($_rebased_build_config:deps_info:apk_path)", |
2179 ] | 2178 ] |
2180 } | 2179 } |
2181 } | 2180 } |
2182 if (defined(invoker.isolate_file)) { | 2181 if (defined(invoker.isolate_file)) { |
2183 data += [ invoker.isolate_file ] | |
2184 test_runner_args += [ | 2182 test_runner_args += [ |
2185 "--isolate-file-path", | 2183 "--isolate-file-path", |
2186 rebase_path(invoker.isolate_file, root_build_dir), | 2184 rebase_path(invoker.isolate_file, root_build_dir), |
2187 ] | 2185 ] |
2188 } | 2186 } |
2189 if (defined(invoker.shard_timeout)) { | 2187 if (defined(invoker.shard_timeout)) { |
2190 test_runner_args += [ "--shard-timeout=${invoker.shard_timeout}" ] | 2188 test_runner_args += [ "--shard-timeout=${invoker.shard_timeout}" ] |
2191 } | 2189 } |
2192 if (_incremental_install) { | 2190 if (_incremental_install) { |
2193 test_runner_args += [ | 2191 test_runner_args += [ |
(...skipping 10 matching lines...) Expand all Loading... |
2204 } | 2202 } |
2205 if (is_asan) { | 2203 if (is_asan) { |
2206 test_runner_args += [ "--tool=asan" ] | 2204 test_runner_args += [ "--tool=asan" ] |
2207 } | 2205 } |
2208 | 2206 |
2209 generated_script = "$root_build_dir/bin/run_${_test_name}" | 2207 generated_script = "$root_build_dir/bin/run_${_test_name}" |
2210 outputs = [ | 2208 outputs = [ |
2211 depfile, | 2209 depfile, |
2212 generated_script, | 2210 generated_script, |
2213 ] | 2211 ] |
2214 data += [ generated_script ] | 2212 data = [ |
| 2213 generated_script, |
| 2214 ] |
2215 | 2215 |
2216 args = [ | 2216 args = [ |
2217 "--depfile", | 2217 "--depfile", |
2218 rebase_path(depfile, root_build_dir), | 2218 rebase_path(depfile, root_build_dir), |
2219 "--script-output-path", | 2219 "--script-output-path", |
2220 rebase_path(generated_script, root_build_dir), | 2220 rebase_path(generated_script, root_build_dir), |
2221 ] | 2221 ] |
2222 args += test_runner_args | 2222 args += test_runner_args |
2223 } | 2223 } |
2224 } | 2224 } |
OLD | NEW |