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

Unified Diff: build/config/fuchsia/rules.gni

Issue 2692273008: Hacky slashy (Closed)
Patch Set: rebase on config CL, and minor fixes Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/fuchsia/create_test_runner_script.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/fuchsia/rules.gni
diff --git a/build/config/fuchsia/rules.gni b/build/config/fuchsia/rules.gni
new file mode 100644
index 0000000000000000000000000000000000000000..6f6995888f16ec4a3e25a9d69b31300970bfa37f
--- /dev/null
+++ b/build/config/fuchsia/rules.gni
@@ -0,0 +1,76 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+assert(is_fuchsia)
+
+template("test_runner_script") {
+ testonly = true
+ _test_name = invoker.test_name
+
+ # This runtime_deps file is used at runtime and thus cannot go in
+ # target_gen_dir.
+ _target_dir_name = get_label_info(":$target_name", "dir")
+ _runtime_deps_file =
+ "$root_out_dir/gen.runtime/$_target_dir_name/$target_name.runtime_deps"
+ _runtime_deps_target = "${target_name}__write_deps"
+ group(_runtime_deps_target) {
+ forward_variables_from(invoker,
+ [
+ "data",
+ "data_deps",
+ "deps",
+ "public_deps",
+ ])
+ write_runtime_deps = _runtime_deps_file
+ }
+
+ action(target_name) {
+ forward_variables_from(invoker,
+ [
+ "data_deps",
+ "deps",
+ ])
+ if (!defined(deps)) {
+ deps = []
+ }
+ if (!defined(data_deps)) {
+ data_deps = []
+ }
+
+ script = "//build/fuchsia/create_test_runner_script.py"
+ depfile = "$target_gen_dir/$target_name.d"
+
+ data = []
+ test_runner_args = []
+
+ generated_script = "$root_build_dir/bin/run_${_test_name}"
+ outputs = [
+ generated_script,
+ ]
+ data += [ generated_script ]
+
+ test_runner_args += [
+ "--output-directory",
+ rebase_path(root_build_dir, root_build_dir),
+ ]
+
+ deps += [ ":$_runtime_deps_target" ]
+ data += [ _runtime_deps_file ]
+ test_runner_args += [
+ "--runtime-deps-path",
+ rebase_path(_runtime_deps_file, root_build_dir),
+ ]
+
+ args = [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ "--script-output-path",
+ rebase_path(generated_script, root_build_dir),
+ "--test-name",
+ _test_name,
+ ]
+
+ args += test_runner_args
+ }
+}
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/fuchsia/create_test_runner_script.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698