| Index: mojo/shell/tests/BUILD.gn
|
| diff --git a/mojo/shell/tests/BUILD.gn b/mojo/shell/tests/BUILD.gn
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d50cf5ec63caa1a0396fc4e77897f74ed5e9d369
|
| --- /dev/null
|
| +++ b/mojo/shell/tests/BUILD.gn
|
| @@ -0,0 +1,186 @@
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import("//mojo/public/mojo_application.gni")
|
| +import("//mojo/public/mojo_application_manifest.gni")
|
| +import("//mojo/public/tools/bindings/mojom.gni")
|
| +import("//testing/test.gni")
|
| +
|
| +group("tests") {
|
| + testonly = true
|
| + deps = [
|
| + ":apptests",
|
| + ":mojo_shell_unittests",
|
| + ]
|
| +}
|
| +
|
| +source_set("test_support") {
|
| + testonly = true
|
| + sources = [
|
| + "capability_filter_test.cc",
|
| + "capability_filter_test.h",
|
| + ]
|
| +
|
| + deps = [
|
| + ":test_bindings",
|
| + "//mojo/shell",
|
| + "//mojo/shell/public/cpp",
|
| + "//mojo/shell/public/interfaces",
|
| + "//testing/gtest",
|
| + ]
|
| +}
|
| +
|
| +# TODO(beng): this target should just be called "unittests" but I am having
|
| +# difficulty with the android _apk generator.
|
| +test("mojo_shell_unittests") {
|
| + sources = [
|
| + "application_manager_unittest.cc",
|
| + "capability_filter_unittest.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":test_bindings",
|
| + ":test_support",
|
| + "//base",
|
| + "//mojo/edk/system:test_utils",
|
| + "//mojo/edk/test:run_all_unittests",
|
| + "//mojo/public/cpp/system",
|
| + "//mojo/shell",
|
| + "//mojo/shell/public/cpp",
|
| + "//mojo/util:filename_util",
|
| + "//testing/gtest",
|
| + "//url",
|
| + ]
|
| +}
|
| +
|
| +mojom("test_bindings") {
|
| + sources = [
|
| + "application_manager_apptests.mojom",
|
| + "capability_filter_unittest.mojom",
|
| + "package_test.mojom",
|
| + "test.mojom",
|
| + ]
|
| +}
|
| +
|
| +mojo_native_application("apptests") {
|
| + output_name = "mojo_shell_apptests"
|
| + testonly = true
|
| +
|
| + sources = [
|
| + "application_manager_apptest.cc",
|
| + "package_apptest.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":apptests_manifest",
|
| + ":test_bindings",
|
| + "//base",
|
| + "//base/test:test_config",
|
| + "//mojo/common:common_base",
|
| + "//mojo/converters/network",
|
| + "//mojo/shell/public/cpp:sources",
|
| + "//mojo/shell/public/cpp:test_support",
|
| + "//mojo/shell/public/interfaces",
|
| + ]
|
| +
|
| + data_deps = [
|
| + ":application_manager_apptest_driver",
|
| + ":application_manager_apptest_target",
|
| + ":package_test_package",
|
| + ]
|
| +}
|
| +
|
| +mojo_application_manifest("apptests_manifest") {
|
| + application_name = "mojo_shell_apptests"
|
| + source = "application_manager_apptest_manifest.json"
|
| +}
|
| +
|
| +mojo_application_manifest("package_test_a_manifest") {
|
| + application_name = "package_test_a"
|
| + source = "package_test_app_a_manifest.json"
|
| +}
|
| +
|
| +mojo_application_manifest("package_test_b_manifest") {
|
| + application_name = "package_test_b"
|
| + source = "package_test_app_b_manifest.json"
|
| +}
|
| +
|
| +mojo_native_application("package_test_package") {
|
| + testonly = true
|
| + sources = [
|
| + "package_test_package.cc",
|
| + ]
|
| + deps = [
|
| + ":package_test_package_manifest",
|
| + ":test_bindings",
|
| + "//base",
|
| + "//mojo/common:common_base",
|
| + "//mojo/shell/public/cpp:sources",
|
| + "//mojo/shell/public/interfaces",
|
| + ]
|
| +}
|
| +
|
| +mojo_application_manifest("package_test_package_manifest") {
|
| + application_name = "package_test_package"
|
| + source = "package_test_package_manifest.json"
|
| + deps = [
|
| + ":package_test_a_manifest",
|
| + ":package_test_b_manifest",
|
| + ]
|
| + packaged_applications = [
|
| + "package_test_a",
|
| + "package_test_b",
|
| + ]
|
| +}
|
| +
|
| +executable("application_manager_apptest_driver") {
|
| + testonly = true
|
| +
|
| + sources = [
|
| + "application_manager_apptest_driver.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":copy_application_manager_apptest_driver_manifest",
|
| + ":test_bindings",
|
| + "//base",
|
| + "//base:base_static",
|
| + "//build/config/sanitizers:deps",
|
| + "//mojo/common:common_base",
|
| + "//mojo/converters/network",
|
| + "//mojo/edk/system",
|
| + "//mojo/shell/public/cpp",
|
| + "//mojo/shell/public/interfaces",
|
| + "//mojo/shell/runner:init",
|
| + "//mojo/shell/runner/child:test_native_main",
|
| + "//mojo/shell/runner/common",
|
| + ]
|
| +}
|
| +
|
| +copy("copy_application_manager_apptest_driver_manifest") {
|
| + sources = [
|
| + "application_manager_apptest_driver_manifest.json",
|
| + ]
|
| + outputs = [
|
| + "${root_out_dir}/{{source_file_part}}",
|
| + ]
|
| +}
|
| +
|
| +executable("application_manager_apptest_target") {
|
| + testonly = true
|
| +
|
| + sources = [
|
| + "application_manager_apptest_target.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":test_bindings",
|
| + "//base",
|
| + "//build/config/sanitizers:deps",
|
| + "//mojo/common:common_base",
|
| + "//mojo/converters/network",
|
| + "//mojo/shell/public/cpp",
|
| + "//mojo/shell/runner/child:test_native_main",
|
| + ]
|
| +}
|
|
|