Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 _blimp_unittests_runtime_deps = "$root_gen_dir/blimp-unittests.runtime_deps" | |
| 63 _rebased_blimp_unittests_runtime_deps = | |
| 64 rebase_path(_blimp_unittests_runtime_deps, root_out_dir) | |
| 65 | |
| 62 test("blimp_unittests") { | 66 test("blimp_unittests") { |
| 63 deps = [ | 67 deps = [ |
| 64 "//blimp/client:app_unit_tests", | 68 "//blimp/client:app_unit_tests", |
| 65 "//blimp/client:blimp_client_unit_tests", | 69 "//blimp/client:blimp_client_unit_tests", |
| 66 "//blimp/client:feature_unit_tests", | 70 "//blimp/client:feature_unit_tests", |
| 67 "//blimp/common:unit_tests", | 71 "//blimp/common:unit_tests", |
| 68 "//blimp/net:unit_tests", | 72 "//blimp/net:unit_tests", |
| 69 ] | 73 ] |
| 70 | 74 |
| 71 if (is_linux) { | 75 if (is_linux) { |
| 72 deps += [ "//blimp/engine:unit_tests" ] | 76 deps += [ "//blimp/engine:unit_tests" ] |
| 73 } | 77 } |
| 78 | |
| 79 write_runtime_deps = _blimp_unittests_runtime_deps | |
| 80 } | |
| 81 | |
| 82 group("blimp_unittests_group") { | |
| 83 testonly = true | |
| 84 | |
| 85 public_deps = [ | |
| 86 ":blimp_unittests", | |
| 87 ] | |
| 88 } | |
| 89 | |
| 90 _blimp_env_tests_runtime_deps = "$root_gen_dir/blimp-env-tests.runtime_deps" | |
| 91 _rebased_blimp_env_tests_runtime_deps = | |
| 92 rebase_path(_blimp_env_tests_runtime_deps, root_out_dir) | |
| 93 | |
| 94 group("blimp_env_tests_group") { | |
| 95 testonly = true | |
| 96 | |
| 97 # Executable targets and those executable targets' transitive | |
| 98 # dependencies are not considered unless that executable is listed in | |
| 99 # "data_deps". Otherwise, GN assumes that the executable (and | |
| 100 # everything it requires) is a build-time dependency only. | |
| 101 data_deps = [ | |
| 102 "//base:base_unittests", | |
|
Jess
2016/05/24 00:18:30
dpranke: Please sanity check how I am generating t
| |
| 103 ] | |
| 104 | |
| 105 write_runtime_deps = _blimp_env_tests_runtime_deps | |
| 74 } | 106 } |
| 75 | 107 |
| 76 if (is_linux) { | 108 if (is_linux) { |
| 77 test("blimp_browsertests") { | 109 test("blimp_browsertests") { |
| 78 deps = [ | 110 deps = [ |
| 79 "//blimp/test:engine_browsertests", | 111 "//blimp/test:engine_browsertests", |
| 80 ] | 112 ] |
| 81 } | 113 } |
| 114 | |
| 115 _blimp_unittests_manifest = "$root_gen_dir/unittests-manifest.txt" | |
| 116 _rebased_blimp_unittests_manifest = | |
| 117 rebase_path(_blimp_unittests_manifest, root_out_dir) | |
| 118 _rebased_blimp_unittests_blacklist = | |
| 119 rebase_path("//blimp/tools/unittests-manifest-blacklist.txt") | |
| 120 | |
| 121 action("generate_blimp_unittests_manifest") { | |
| 122 testonly = true | |
| 123 script = "//blimp/tools/generate-target-manifest.py" | |
| 124 args = [ | |
| 125 "--blacklist", | |
| 126 _rebased_blimp_unittests_blacklist, | |
| 127 "--runtime-deps-file", | |
| 128 _rebased_blimp_unittests_runtime_deps, | |
| 129 "--output", | |
| 130 _rebased_blimp_unittests_manifest, | |
| 131 ] | |
| 132 inputs = [ | |
| 133 _blimp_unittests_runtime_deps, | |
| 134 ] | |
| 135 outputs = [ | |
| 136 _blimp_unittests_manifest, | |
| 137 ] | |
| 138 | |
| 139 # By specifying a dependency (not a data_dependency) on | |
| 140 # :blimp_unittests_group, | |
| 141 # we can be sure that everything is built before the action is | |
| 142 # complete (though not necessarily before we generate the manifest | |
| 143 # itself). | |
| 144 deps = [ | |
| 145 ":blimp_unittests_group", | |
| 146 ] | |
| 147 } | |
| 148 | |
| 149 _blimp_env_tests_manifest = "$root_gen_dir/env-tests-manifest.txt" | |
| 150 _rebased_blimp_env_tests_manifest = | |
| 151 rebase_path(_blimp_env_tests_manifest, root_out_dir) | |
| 152 _rebased_blimp_env_tests_blacklist = | |
| 153 rebase_path("//blimp/tools/env-tests-manifest-blacklist.txt") | |
| 154 | |
| 155 action("generate_blimp_env_tests_manifest") { | |
| 156 testonly = true | |
| 157 script = "//blimp/tools/generate-target-manifest.py" | |
| 158 args = [ | |
| 159 "--blacklist", | |
| 160 _rebased_blimp_env_tests_blacklist, | |
| 161 "--runtime-deps-file", | |
| 162 _rebased_blimp_env_tests_runtime_deps, | |
| 163 "--output", | |
| 164 _rebased_blimp_env_tests_manifest, | |
| 165 ] | |
| 166 inputs = [ | |
| 167 _blimp_env_tests_runtime_deps, | |
| 168 ] | |
| 169 outputs = [ | |
| 170 _blimp_env_tests_manifest, | |
| 171 ] | |
| 172 | |
| 173 # By specifying a dependency (not a data_dependency) on | |
| 174 # :blimp_env_tests_group, | |
| 175 # we can be sure that everything is built before the action is | |
| 176 # complete (though not necessarily before we generate the manifest | |
| 177 # itself). | |
| 178 deps = [ | |
| 179 ":blimp_env_tests_group", | |
| 180 ] | |
| 181 } | |
| 82 } | 182 } |
| OLD | NEW |