| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//mojo/public/mojo_application.gni") | |
| 6 import("//mojo/public/mojo_application_manifest.gni") | |
| 7 import("//mojo/public/tools/bindings/mojom.gni") | 5 import("//mojo/public/tools/bindings/mojom.gni") |
| 8 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 9 | 7 |
| 10 group("all") { | 8 group("all") { |
| 11 testonly = true | 9 testonly = true |
| 12 deps = [ | 10 deps = [ |
| 13 ":shell", | 11 ":shell", |
| 14 "//mojo/shell/runner", | 12 "//mojo/shell/runner", |
| 15 ] | 13 ] |
| 16 } | 14 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 "//mojo/environment:chromium", | 57 "//mojo/environment:chromium", |
| 60 "//mojo/services/package_manager:lib", | 58 "//mojo/services/package_manager:lib", |
| 61 "//mojo/shell/public/cpp:sources", | 59 "//mojo/shell/public/cpp:sources", |
| 62 "//mojo/util:filename_util", | 60 "//mojo/util:filename_util", |
| 63 "//url", | 61 "//url", |
| 64 ] | 62 ] |
| 65 | 63 |
| 66 # For mojo/shell/application_loader.h | 64 # For mojo/shell/application_loader.h |
| 67 allow_circular_includes_from = [ "//mojo/services/package_manager:lib" ] | 65 allow_circular_includes_from = [ "//mojo/services/package_manager:lib" ] |
| 68 } | 66 } |
| 69 | |
| 70 source_set("test_support") { | |
| 71 testonly = true | |
| 72 sources = [ | |
| 73 "capability_filter_test.cc", | |
| 74 "capability_filter_test.h", | |
| 75 ] | |
| 76 | |
| 77 deps = [ | |
| 78 ":shell", | |
| 79 ":test_bindings", | |
| 80 "//mojo/shell/public/cpp", | |
| 81 "//mojo/shell/public/interfaces", | |
| 82 "//testing/gtest", | |
| 83 ] | |
| 84 } | |
| 85 | |
| 86 # TODO(beng): this target should just be called "unittests" but I am having | |
| 87 # difficulty with the android _apk generator. | |
| 88 test("mojo_shell_unittests") { | |
| 89 sources = [ | |
| 90 "application_manager_unittest.cc", | |
| 91 "capability_filter_unittest.cc", | |
| 92 ] | |
| 93 | |
| 94 deps = [ | |
| 95 ":shell", | |
| 96 ":test_bindings", | |
| 97 ":test_support", | |
| 98 "//base", | |
| 99 "//mojo/edk/system:test_utils", | |
| 100 "//mojo/edk/test:run_all_unittests", | |
| 101 "//mojo/public/cpp/system", | |
| 102 "//mojo/shell/public/cpp", | |
| 103 "//mojo/util:filename_util", | |
| 104 "//testing/gtest", | |
| 105 "//url", | |
| 106 ] | |
| 107 } | |
| 108 | |
| 109 mojom("test_bindings") { | |
| 110 sources = [ | |
| 111 "application_manager_apptests.mojom", | |
| 112 "capability_filter_unittest.mojom", | |
| 113 "package_test.mojom", | |
| 114 "test.mojom", | |
| 115 ] | |
| 116 } | |
| 117 | |
| 118 mojo_native_application("apptests") { | |
| 119 output_name = "mojo_shell_apptests" | |
| 120 testonly = true | |
| 121 | |
| 122 sources = [ | |
| 123 "application_manager_apptest.cc", | |
| 124 "package_apptest.cc", | |
| 125 ] | |
| 126 | |
| 127 deps = [ | |
| 128 ":apptests_manifest", | |
| 129 ":test_bindings", | |
| 130 "//base", | |
| 131 "//base/test:test_config", | |
| 132 "//mojo/common:common_base", | |
| 133 "//mojo/converters/network", | |
| 134 "//mojo/shell/public/cpp:sources", | |
| 135 "//mojo/shell/public/cpp:test_support", | |
| 136 "//mojo/shell/public/interfaces", | |
| 137 ] | |
| 138 | |
| 139 data_deps = [ | |
| 140 ":application_manager_apptest_driver", | |
| 141 ":application_manager_apptest_target", | |
| 142 ":package_test_package", | |
| 143 ] | |
| 144 } | |
| 145 | |
| 146 mojo_application_manifest("apptests_manifest") { | |
| 147 application_name = "mojo_shell_apptests" | |
| 148 source = "application_manager_apptest_manifest.json" | |
| 149 } | |
| 150 | |
| 151 mojo_application_manifest("package_test_a_manifest") { | |
| 152 application_name = "package_test_a" | |
| 153 source = "package_test_app_a_manifest.json" | |
| 154 } | |
| 155 | |
| 156 mojo_application_manifest("package_test_b_manifest") { | |
| 157 application_name = "package_test_b" | |
| 158 source = "package_test_app_b_manifest.json" | |
| 159 } | |
| 160 | |
| 161 mojo_native_application("package_test_package") { | |
| 162 testonly = true | |
| 163 sources = [ | |
| 164 "package_test_package.cc", | |
| 165 ] | |
| 166 deps = [ | |
| 167 ":package_test_package_manifest", | |
| 168 ":test_bindings", | |
| 169 "//base", | |
| 170 "//mojo/common:common_base", | |
| 171 "//mojo/shell/public/cpp:sources", | |
| 172 "//mojo/shell/public/interfaces", | |
| 173 ] | |
| 174 } | |
| 175 | |
| 176 mojo_application_manifest("package_test_package_manifest") { | |
| 177 application_name = "package_test_package" | |
| 178 source = "package_test_package_manifest.json" | |
| 179 deps = [ | |
| 180 ":package_test_a_manifest", | |
| 181 ":package_test_b_manifest", | |
| 182 ] | |
| 183 packaged_applications = [ | |
| 184 "package_test_a", | |
| 185 "package_test_b", | |
| 186 ] | |
| 187 } | |
| 188 | |
| 189 executable("application_manager_apptest_driver") { | |
| 190 testonly = true | |
| 191 | |
| 192 sources = [ | |
| 193 "application_manager_apptest_driver.cc", | |
| 194 ] | |
| 195 | |
| 196 deps = [ | |
| 197 ":copy_application_manager_apptest_driver_manifest", | |
| 198 ":test_bindings", | |
| 199 "//base", | |
| 200 "//base:base_static", | |
| 201 "//build/config/sanitizers:deps", | |
| 202 "//mojo/common:common_base", | |
| 203 "//mojo/converters/network", | |
| 204 "//mojo/edk/system", | |
| 205 "//mojo/shell/public/cpp", | |
| 206 "//mojo/shell/public/interfaces", | |
| 207 "//mojo/shell/runner:init", | |
| 208 "//mojo/shell/runner/child:test_native_main", | |
| 209 "//mojo/shell/runner/common", | |
| 210 ] | |
| 211 } | |
| 212 | |
| 213 copy("copy_application_manager_apptest_driver_manifest") { | |
| 214 sources = [ | |
| 215 "application_manager_apptest_driver_manifest.json", | |
| 216 ] | |
| 217 outputs = [ | |
| 218 "${root_out_dir}/{{source_file_part}}", | |
| 219 ] | |
| 220 } | |
| 221 | |
| 222 executable("application_manager_apptest_target") { | |
| 223 testonly = true | |
| 224 | |
| 225 sources = [ | |
| 226 "application_manager_apptest_target.cc", | |
| 227 ] | |
| 228 | |
| 229 deps = [ | |
| 230 ":test_bindings", | |
| 231 "//base", | |
| 232 "//build/config/sanitizers:deps", | |
| 233 "//mojo/common:common_base", | |
| 234 "//mojo/converters/network", | |
| 235 "//mojo/shell/public/cpp", | |
| 236 "//mojo/shell/runner/child:test_native_main", | |
| 237 ] | |
| 238 } | |
| OLD | NEW |