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

Side by Side Diff: blimp/BUILD.gn

Issue 1997493002: Adding basic unittest manifest generation to blimp/BUILD.gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving a trybot dependency complaint. Created 4 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 | « no previous file | blimp/tools/env-tests-manifest-blacklist.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 import("//testing/test.gni") 7 import("//testing/test.gni")
8 8
9 # Convenience meta-target for all of Blimp's production & test code. 9 # Convenience meta-target for all of Blimp's production & test code.
10 group("blimp") { 10 group("blimp") {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 if (is_android) { 53 if (is_android) {
54 deps += [ "//blimp/client:blimp_test_apk" ] 54 deps += [ "//blimp/client:blimp_test_apk" ]
55 } 55 }
56 56
57 if (is_linux) { 57 if (is_linux) {
58 deps += [ ":blimp_browsertests" ] 58 deps += [ ":blimp_browsertests" ]
59 } 59 }
60 } 60 }
61 61
62 if (is_linux) {
63 test("blimp_browsertests") {
64 deps = [
65 "//blimp/test:engine_browsertests",
66 ]
67 }
68 }
69
70 _blimp_unittests_runtime_deps = "$root_gen_dir/blimp-unittests.runtime_deps"
71 _rebased_blimp_unittests_runtime_deps =
72 rebase_path(_blimp_unittests_runtime_deps, root_out_dir)
73
62 test("blimp_unittests") { 74 test("blimp_unittests") {
63 deps = [ 75 deps = [
64 "//blimp/client:app_unit_tests", 76 "//blimp/client:app_unit_tests",
65 "//blimp/client:blimp_client_unit_tests", 77 "//blimp/client:blimp_client_unit_tests",
66 "//blimp/client:feature_unit_tests", 78 "//blimp/client:feature_unit_tests",
67 "//blimp/common:unit_tests", 79 "//blimp/common:unit_tests",
68 "//blimp/net:unit_tests", 80 "//blimp/net:unit_tests",
69 ] 81 ]
70 82
71 if (is_linux) { 83 if (is_linux) {
72 deps += [ "//blimp/engine:unit_tests" ] 84 deps += [ "//blimp/engine:unit_tests" ]
73 } 85 }
86
87 write_runtime_deps = _blimp_unittests_runtime_deps
74 } 88 }
75 89
76 if (is_linux) { 90 group("blimp_unittests_group") {
77 test("blimp_browsertests") { 91 testonly = true
78 deps = [ 92
79 "//blimp/test:engine_browsertests", 93 public_deps = [
80 ] 94 ":blimp_unittests",
81 } 95 ]
82 } 96 }
97
98 _blimp_env_tests_runtime_deps = "$root_gen_dir/blimp-env-tests.runtime_deps"
99 _rebased_blimp_env_tests_runtime_deps =
100 rebase_path(_blimp_env_tests_runtime_deps, root_out_dir)
101
102 group("blimp_env_tests_group") {
maniscalco 2016/05/24 22:04:48 Env stands for environment, right? What do we mea
Jess 2016/05/24 23:53:37 Added more comments to this group and on what shou
maniscalco 2016/05/25 15:42:57 Yeah, let's chat OOB. I'm still not quite sure I
103 testonly = true
104
105 # Executable targets and those executable targets' transitive
106 # dependencies are not considered unless that executable is listed in
107 # "data_deps". Otherwise, GN assumes that the executable (and
108 # everything it requires) is a build-time dependency only.
109 data_deps = [
110 "//base:base_unittests",
111 ]
112
113 write_runtime_deps = _blimp_env_tests_runtime_deps
114 }
115
116 _blimp_unittests_manifest = "$root_gen_dir/unittests-manifest.txt"
117 _rebased_blimp_unittests_manifest =
118 rebase_path(_blimp_unittests_manifest, root_out_dir)
119 _rebased_blimp_unittests_blacklist =
maniscalco 2016/05/24 22:04:48 This may be a silly question, but I want to make s
Jess 2016/05/24 23:53:37 Not silly at all. The existing blacklists are some
maniscalco 2016/05/25 15:42:57 OK, let's chat about this one OOB as well. The mo
120 rebase_path("//blimp/tools/unittests-manifest-blacklist.txt")
121
122 action("generate_blimp_unittests_manifest") {
123 testonly = true
124 script = "//blimp/tools/generate-target-manifest.py"
125 args = [
126 "--blacklist",
127 _rebased_blimp_unittests_blacklist,
128 "--runtime-deps-file",
129 _rebased_blimp_unittests_runtime_deps,
130 "--output",
131 _rebased_blimp_unittests_manifest,
132 ]
133 inputs = [
134 _blimp_unittests_runtime_deps,
135 ]
136 outputs = [
137 _blimp_unittests_manifest,
138 ]
139
140 # By specifying a dependency (not a data_dependency) on
141 # :blimp_unittests_group,
142 # we can be sure that everything is built before the action is
143 # complete (though not necessarily before we generate the manifest
144 # itself).
145 public_deps = [
146 ":blimp_unittests_group",
147 ]
148 }
Dirk Pranke 2016/05/24 21:29:28 nit: I would probably move lines 116-148 above lin
Jess 2016/05/24 23:53:37 Done.
149
150 _blimp_env_tests_manifest = "$root_gen_dir/env-tests-manifest.txt"
151 _rebased_blimp_env_tests_manifest =
152 rebase_path(_blimp_env_tests_manifest, root_out_dir)
153 _rebased_blimp_env_tests_blacklist =
154 rebase_path("//blimp/tools/env-tests-manifest-blacklist.txt")
155
156 action("generate_blimp_env_tests_manifest") {
157 testonly = true
158 script = "//blimp/tools/generate-target-manifest.py"
159 args = [
160 "--blacklist",
161 _rebased_blimp_env_tests_blacklist,
162 "--runtime-deps-file",
163 _rebased_blimp_env_tests_runtime_deps,
164 "--output",
165 _rebased_blimp_env_tests_manifest,
166 ]
167 inputs = [
168 _blimp_env_tests_runtime_deps,
169 ]
170 outputs = [
171 _blimp_env_tests_manifest,
172 ]
173
174 # By specifying a dependency (not a data_dependency) on
175 # :blimp_env_tests_group,
176 # we can be sure that everything is built before the action is
177 # complete (though not necessarily before we generate the manifest
178 # itself).
179 deps = [
180 ":blimp_env_tests_group",
181 ]
182 }
OLDNEW
« no previous file with comments | « no previous file | blimp/tools/env-tests-manifest-blacklist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698