Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: build/config/android/internal_rules.gni

Issue 1841193002: 🍬 GN: Make breakpad_unittests & sandbox_linux_unittests use test() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-minor-renames
Patch Set: Test runner, backwards-compat with recipes, added sandbox_linux_unittests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 2066
2067 action(target_name) { 2067 action(target_name) {
2068 script = "//build/android/gyp/create_test_runner_script.py" 2068 script = "//build/android/gyp/create_test_runner_script.py"
2069 depfile = "$target_gen_dir/$target_name.d" 2069 depfile = "$target_gen_dir/$target_name.d"
2070 deps = [] 2070 deps = []
2071 2071
2072 datadeps = [ 2072 datadeps = [
2073 "//build/android:test_runner_py", 2073 "//build/android:test_runner_py",
2074 ] 2074 ]
2075 2075
2076 test_runner_args = [
2077 _test_type,
2078 "--output-directory",
2079 rebase_path(root_build_dir, root_build_dir),
2080 ]
2081
2076 # apk_target is not used for native executable tests 2082 # apk_target is not used for native executable tests
2077 # (e.g. breakpad_unittests). 2083 # (e.g. breakpad_unittests).
2078 if (defined(invoker.apk_target)) { 2084 if (defined(invoker.apk_target)) {
2085 assert(!defined(invoker.executable))
2079 deps += [ "${invoker.apk_target}__build_config" ] 2086 deps += [ "${invoker.apk_target}__build_config" ]
2080 _apk_build_config = 2087 _apk_build_config =
2081 get_label_info(invoker.apk_target, "target_gen_dir") + "/" + 2088 get_label_info(invoker.apk_target, "target_gen_dir") + "/" +
2082 get_label_info(invoker.apk_target, "name") + ".build_config" 2089 get_label_info(invoker.apk_target, "name") + ".build_config"
2083 _rebased_apk_build_config = rebase_path(_apk_build_config, root_build_dir) 2090 _rebased_apk_build_config = rebase_path(_apk_build_config, root_build_dir)
2084 assert(_rebased_apk_build_config != "") # Mark as used. 2091 assert(_rebased_apk_build_config != "") # Mark as used.
2092 } else if (_test_type == "gtest") {
2093 assert(
2094 defined(invoker.executable),
2095 "Must defined either apk_target or executable for test_runner_script() ")
jbudorick 2016/03/30 19:33:38 nit: s/defined/define/
agrieve 2016/03/30 19:52:57 Done.
2096 test_runner_args += [
2097 "--executable-path",
2098 rebase_path(invoker.executable, root_build_dir),
2099 ]
2085 } 2100 }
2086 2101
2087 test_runner_args = [
2088 _test_type,
2089 "--output-directory",
2090 rebase_path(root_build_dir, root_build_dir),
2091 ]
2092 if (_test_type == "gtest") { 2102 if (_test_type == "gtest") {
2093 assert(defined(invoker.test_suite)) 2103 assert(defined(invoker.test_suite))
2094 test_runner_args += [ 2104 test_runner_args += [
2095 "--suite", 2105 "--suite",
2096 invoker.test_suite, 2106 invoker.test_suite,
2097 ] 2107 ]
2098 } else if (_test_type == "instrumentation") { 2108 } else if (_test_type == "instrumentation") {
2099 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:apk_path)" 2109 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:apk_path)"
2100 if (_incremental_install) { 2110 if (_incremental_install) {
2101 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:incremental_a pk_path)" 2111 _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:incremental_a pk_path)"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 ] 2185 ]
2176 args = [ 2186 args = [
2177 "--depfile", 2187 "--depfile",
2178 rebase_path(depfile, root_build_dir), 2188 rebase_path(depfile, root_build_dir),
2179 "--script-output-path", 2189 "--script-output-path",
2180 rebase_path(generated_script, root_build_dir), 2190 rebase_path(generated_script, root_build_dir),
2181 ] 2191 ]
2182 args += test_runner_args 2192 args += test_runner_args
2183 } 2193 }
2184 } 2194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698