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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 assert(is_fuchsia)
6
7 template("test_runner_script") {
8 testonly = true
9 _test_name = invoker.test_name
10
11 # This runtime_deps file is used at runtime and thus cannot go in
12 # target_gen_dir.
13 _target_dir_name = get_label_info(":$target_name", "dir")
14 _runtime_deps_file =
15 "$root_out_dir/gen.runtime/$_target_dir_name/$target_name.runtime_deps"
16 _runtime_deps_target = "${target_name}__write_deps"
17 group(_runtime_deps_target) {
18 forward_variables_from(invoker,
19 [
20 "data",
21 "data_deps",
22 "deps",
23 "public_deps",
24 ])
25 write_runtime_deps = _runtime_deps_file
26 }
27
28 action(target_name) {
29 forward_variables_from(invoker,
30 [
31 "data_deps",
32 "deps",
33 ])
34 if (!defined(deps)) {
35 deps = []
36 }
37 if (!defined(data_deps)) {
38 data_deps = []
39 }
40
41 script = "//build/fuchsia/create_test_runner_script.py"
42 depfile = "$target_gen_dir/$target_name.d"
43
44 data = []
45 test_runner_args = []
46
47 generated_script = "$root_build_dir/bin/run_${_test_name}"
48 outputs = [
49 generated_script,
50 ]
51 data += [ generated_script ]
52
53 test_runner_args += [
54 "--output-directory",
55 rebase_path(root_build_dir, root_build_dir),
56 ]
57
58 deps += [ ":$_runtime_deps_target" ]
59 data += [ _runtime_deps_file ]
60 test_runner_args += [
61 "--runtime-deps-path",
62 rebase_path(_runtime_deps_file, root_build_dir),
63 ]
64
65 args = [
66 "--depfile",
67 rebase_path(depfile, root_build_dir),
68 "--script-output-path",
69 rebase_path(generated_script, root_build_dir),
70 "--test-name",
71 _test_name,
72 ]
73
74 args += test_runner_args
75 }
76 }
OLDNEW
« 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