Chromium Code Reviews| Index: blimp/BUILD.gn |
| diff --git a/blimp/BUILD.gn b/blimp/BUILD.gn |
| index f7191103828b6b8f10dbcb5e758415c398555c9e..8e2ad4b56cbdbf954d275f1a109233a8126fe474 100644 |
| --- a/blimp/BUILD.gn |
| +++ b/blimp/BUILD.gn |
| @@ -59,6 +59,10 @@ group("blimp_tests") { |
| } |
| } |
| +_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,6 +75,34 @@ test("blimp_unittests") { |
| if (is_linux) { |
| deps += [ "//blimp/engine:unit_tests" ] |
| } |
| + |
| + write_runtime_deps = _blimp_unittests_runtime_deps |
| +} |
| + |
| +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") { |
| + 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", |
|
Jess
2016/05/24 00:18:30
dpranke: Please sanity check how I am generating t
|
| + ] |
| + |
| + write_runtime_deps = _blimp_env_tests_runtime_deps |
| } |
| if (is_linux) { |
| @@ -79,4 +111,72 @@ if (is_linux) { |
| "//blimp/test:engine_browsertests", |
| ] |
| } |
| + |
| + _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 = |
| + 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). |
| + deps = [ |
| + ":blimp_unittests_group", |
| + ] |
| + } |
| + |
| + _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", |
| + ] |
| + } |
| } |