| # Copyright 2020 The Fuchsia 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("//build/components.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":present_view_tests" ] |
| } |
| |
| fuchsia_test_component("present_view_integration_tests") { |
| deps = [ ":present_view_integration_tests_bin" ] |
| manifest = "meta/present_view_integration_tests.cmx" |
| } |
| |
| fuchsia_unittest_component("present_view_unittests") { |
| deps = [ ":present_view_unittests_bin" ] |
| } |
| |
| fuchsia_test_component("present_view") { |
| deps = [ "..:present_view" ] |
| manifest = "../meta/present_view.cmx" |
| } |
| |
| fuchsia_test_package("present_view_tests") { |
| test_components = [ |
| ":present_view_integration_tests", |
| ":present_view_unittests", |
| ] |
| |
| # The integration tests need to launch the `present_view` component. |
| # Depending on the component here places it inside of the test package, improving heremticity. |
| deps = [ ":present_view" ] |
| } |
| |
| executable("present_view_integration_tests_bin") { |
| testonly = true |
| |
| output_name = "present_view_integration_tests" |
| |
| sources = [ "present_view_integration_test.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.ui.app", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp/testing:integration_fixture", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/ui/tools/present_view/testing:integration", |
| ] |
| } |
| |
| executable("present_view_unittests_bin") { |
| testonly = true |
| |
| output_name = "present_view_unittests" |
| |
| sources = [ "present_view_unittest.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.ui.app", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/ui/tools/present_view:lib", |
| "//src/ui/tools/present_view/testing:unit", |
| ] |
| } |