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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | blimp/tools/env-tests-manifest-blacklist.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/BUILD.gn
diff --git a/blimp/BUILD.gn b/blimp/BUILD.gn
index f7191103828b6b8f10dbcb5e758415c398555c9e..a5730d8d3e24af1468dfad3f3dfdd951e653771a 100644
--- a/blimp/BUILD.gn
+++ b/blimp/BUILD.gn
@@ -59,6 +59,18 @@ group("blimp_tests") {
}
}
+if (is_linux) {
+ test("blimp_browsertests") {
+ deps = [
+ "//blimp/test:engine_browsertests",
+ ]
+ }
+}
+
+_blimp_unittests_runtime_deps = "$root_gen_dir/blimp-unittests.runtime_deps"
+_rebased_blimp_unittests_runtime_deps =
+ rebase_path(_blimp_unittests_runtime_deps, root_out_dir)
+
test("blimp_unittests") {
deps = [
"//blimp/client:app_unit_tests",
@@ -71,12 +83,100 @@ test("blimp_unittests") {
if (is_linux) {
deps += [ "//blimp/engine:unit_tests" ]
}
+
+ write_runtime_deps = _blimp_unittests_runtime_deps
}
-if (is_linux) {
- test("blimp_browsertests") {
- deps = [
- "//blimp/test:engine_browsertests",
- ]
- }
+group("blimp_unittests_group") {
+ testonly = true
+
+ public_deps = [
+ ":blimp_unittests",
+ ]
+}
+
+_blimp_env_tests_runtime_deps = "$root_gen_dir/blimp-env-tests.runtime_deps"
+_rebased_blimp_env_tests_runtime_deps =
+ rebase_path(_blimp_env_tests_runtime_deps, root_out_dir)
+
+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
+ testonly = true
+
+ # Executable targets and those executable targets' transitive
+ # dependencies are not considered unless that executable is listed in
+ # "data_deps". Otherwise, GN assumes that the executable (and
+ # everything it requires) is a build-time dependency only.
+ data_deps = [
+ "//base:base_unittests",
+ ]
+
+ write_runtime_deps = _blimp_env_tests_runtime_deps
+}
+
+_blimp_unittests_manifest = "$root_gen_dir/unittests-manifest.txt"
+_rebased_blimp_unittests_manifest =
+ rebase_path(_blimp_unittests_manifest, root_out_dir)
+_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
+ rebase_path("//blimp/tools/unittests-manifest-blacklist.txt")
+
+action("generate_blimp_unittests_manifest") {
+ testonly = true
+ script = "//blimp/tools/generate-target-manifest.py"
+ args = [
+ "--blacklist",
+ _rebased_blimp_unittests_blacklist,
+ "--runtime-deps-file",
+ _rebased_blimp_unittests_runtime_deps,
+ "--output",
+ _rebased_blimp_unittests_manifest,
+ ]
+ inputs = [
+ _blimp_unittests_runtime_deps,
+ ]
+ outputs = [
+ _blimp_unittests_manifest,
+ ]
+
+ # By specifying a dependency (not a data_dependency) on
+ # :blimp_unittests_group,
+ # we can be sure that everything is built before the action is
+ # complete (though not necessarily before we generate the manifest
+ # itself).
+ public_deps = [
+ ":blimp_unittests_group",
+ ]
+}
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.
+
+_blimp_env_tests_manifest = "$root_gen_dir/env-tests-manifest.txt"
+_rebased_blimp_env_tests_manifest =
+ rebase_path(_blimp_env_tests_manifest, root_out_dir)
+_rebased_blimp_env_tests_blacklist =
+ rebase_path("//blimp/tools/env-tests-manifest-blacklist.txt")
+
+action("generate_blimp_env_tests_manifest") {
+ testonly = true
+ script = "//blimp/tools/generate-target-manifest.py"
+ args = [
+ "--blacklist",
+ _rebased_blimp_env_tests_blacklist,
+ "--runtime-deps-file",
+ _rebased_blimp_env_tests_runtime_deps,
+ "--output",
+ _rebased_blimp_env_tests_manifest,
+ ]
+ inputs = [
+ _blimp_env_tests_runtime_deps,
+ ]
+ outputs = [
+ _blimp_env_tests_manifest,
+ ]
+
+ # By specifying a dependency (not a data_dependency) on
+ # :blimp_env_tests_group,
+ # we can be sure that everything is built before the action is
+ # complete (though not necessarily before we generate the manifest
+ # itself).
+ deps = [
+ ":blimp_env_tests_group",
+ ]
}
« 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